From 9fb506f4e857dc50adb518e2068a891000bafbae Mon Sep 17 00:00:00 2001 From: Angga Date: Fri, 12 Aug 2022 02:09:00 +0000 Subject: [PATCH] usb/gadget: Fix clang -Wbitfield-constant-conversion ../drivers/usb/gadget/function/f_accessory.c:270:20: warning: implicit truncation from 'int' to bit-field changes value from 1 to -1 [-Wbitfield-constant-conversion] dev->disconnected = 1; ^ ~ ../drivers/usb/gadget/function/f_accessory.c:773:25: warning: implicit truncation from 'int' to bit-field changes value from 1 to -1 [-Wbitfield-constant-conversion] _acc_dev->disconnected = 1; ^ ~ AR drivers/soc/qcom/qmi_helpers.o ../drivers/usb/gadget/function/f_accessory.c:1178:14: warning: implicit truncation from 'int' to bit-field changes value from 1 to -1 [-Wbitfield-constant-conversion] dev->online = 1; ^ ~ Change-Id: I862d37481335eeb0d636d504355081c87e39a591 Signed-off-by: Angga --- drivers/usb/gadget/function/f_accessory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/function/f_accessory.c b/drivers/usb/gadget/function/f_accessory.c index 422f475d8148..b3b549571043 100644 --- a/drivers/usb/gadget/function/f_accessory.c +++ b/drivers/usb/gadget/function/f_accessory.c @@ -80,13 +80,13 @@ struct acc_dev { /* online indicates state of function_set_alt & function_unbind * set to 1 when we connect */ - int online:1; + unsigned int online:1; /* disconnected indicates state of open & release * Set to 1 when we disconnect. * Not cleared until our file is closed. */ - int disconnected:1; + unsigned int disconnected:1; /* strings sent by the host */ char manufacturer[ACC_STRING_SIZE];