From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F709C433E0 for ; Thu, 18 Mar 2021 05:28:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5301F61580 for ; Thu, 18 Mar 2021 05:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229559AbhCRF2G (ORCPT ); Thu, 18 Mar 2021 01:28:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:51210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbhCRF1n (ORCPT ); Thu, 18 Mar 2021 01:27:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 872AC60C3D; Thu, 18 Mar 2021 05:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616045261; bh=qaU7UHvughrkOeu6hpZIgPomE5aqmaGTXKD9+Fnkl7o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xLZNq/2QslnAIhfc+OGJ2u1yHqddm4nBAf+P9JhjPnWLxS8a/Nfvpyb58ise8pzK+ SkdbxcQWETEMzjG61QfiOhswM7yPFpfUzAK/DAIMhG0oFx5StSa9+Ca/lG+1L9PPc/ 4/PX1PBkzThYVNkRXuwTLsH8TQ405CDXu/ecNreA= Date: Thu, 18 Mar 2021 06:27:37 +0100 From: Greg KH To: jiangzhipeng Cc: linux-usb@vger.kernel.org, "edison.jiang" Subject: Re: [PATCH] usb: acpi: Fix shifting 31 bits Message-ID: References: <20210317142513.1340-1-jzp0409@163.com> <20210318100635.000024c6@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210318100635.000024c6@163.com> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Thu, Mar 18, 2021 at 10:14:30AM +0800, jiangzhipeng wrote: > On Wed, 17 Mar 2021 15:51:02 +0100 > Greg KH wrote: > > > On Wed, Mar 17, 2021 at 10:25:13PM +0800, jzp0409 wrote: > > > From: "edison.jiang" > > > > > > Fix undefined behaviour in the usb apci driver by using 'BIT' > > > marcro. > > > > What is undefined about it? > > > > > > > > Signed-off-by: edison.jiang > > > > This name is not a valid signed-off-by name (I doubt you sign > > documents with a ".", right?) and it does not match the "From:" name > > either, so something needs to be fixed before this patch could be > > accepted. > > > > > --- > > > drivers/usb/core/usb-acpi.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/usb/core/usb-acpi.c > > > b/drivers/usb/core/usb-acpi.c index 50b2fc7..3e467a8 100644 > > > --- a/drivers/usb/core/usb-acpi.c > > > +++ b/drivers/usb/core/usb-acpi.c > > > @@ -122,7 +122,7 @@ static enum usb_port_connect_type > > > usb_acpi_get_connect_type(acpi_handle handle, > > > * Private to usb-acpi, all the core needs to know is that > > > * port_dev->location is non-zero when it has been set by the > > > firmware. */ > > > -#define USB_ACPI_LOCATION_VALID (1 << 31) > > > +#define USB_ACPI_LOCATION_VALID BIT(31) > > > > I do not understand what this is trying to fix, please be more > > specific. > > > > thanks, > > > > greg k-h > > cppcheck error: > linux/drivers/usb/core/usb-acpi.c:191]: (error) Shifting signed 32-bit > value by 31 bits is undefined behaviour > That does not explain anything, sorry. greg k-h