lkml.org 
[lkml]   [2018]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [FIXUP v11] fixup! s390: vfio-ap: implement mediated device open callback
From
Date


On 09/28/2018 03:41 PM, Halil Pasic wrote:
>
>
> On 09/28/2018 03:35 PM, Cornelia Huck wrote:
>> On Fri, 28 Sep 2018 09:33:21 -0400
>> Tony Krowiak <akrowiak@linux.vnet.ibm.com> wrote:
>>
>>> From: Tony Krowiak <akrowiak@linux.ibm.com>
>>>
>>> Fixes case statement in vfio_ap_mdev_copy_masks() function in
>>> vfio-ap-ops.c.
>>> ---
>>> drivers/s390/crypto/vfio_ap_ops.c | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
>>> index e1e1beaaeba5..86b42487a51c 100644
>>> --- a/drivers/s390/crypto/vfio_ap_ops.c
>>> +++ b/drivers/s390/crypto/vfio_ap_ops.c
>>> @@ -741,11 +741,12 @@ static void vfio_ap_mdev_copy_masks(struct ap_matrix_mdev *matrix_mdev)
>>> break;
>>> case CRYCB_FORMAT1:
>>> case CRYCB_FORMAT0:
>>> - default:
>>> apm = (unsigned long *)crycb->apcb0.apm;
>>> aqm = (unsigned long *)crycb->apcb0.aqm;
>>> adm = (unsigned long *)crycb->apcb0.adm;
>>> break;
>>> + default:
>>> + return;
>>
>> /* cannot happen */
>>
>> ?
>
> Or use something like BUG(). Without conveying that default is illegal we
> don't gain anything over the previous version IMHO.

Only WARN_ON, if at all.



>
>>
>>> }
>>>
>>> nbytes = DIV_ROUND_UP(matrix_mdev->matrix.apm_max + 1, BITS_PER_BYTE);
>>

\
 
 \ /
  Last update: 2018-09-28 15:43    [W:0.084 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site