From patchwork Thu Mar 29 09:03:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10314765 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3E68560212 for ; Thu, 29 Mar 2018 09:03:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C4062A29D for ; Thu, 29 Mar 2018 09:03:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 208962A2A9; Thu, 29 Mar 2018 09:03:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B1792A29D for ; Thu, 29 Mar 2018 09:03:43 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1E432266F93; Thu, 29 Mar 2018 11:03:42 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 689B2267063; Thu, 29 Mar 2018 11:03:39 +0200 (CEST) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by alsa0.perex.cz (Postfix) with ESMTP id 0DEF0266F69 for ; Thu, 29 Mar 2018 11:03:32 +0200 (CEST) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2T8fG8s016056; Thu, 29 Mar 2018 09:03:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2017-10-26; bh=jl0k7GGaM+htqB+rAEcfKjXftjY49houwUOykBxvCHQ=; b=EohlKPiHCxftN+zk7HHbUp7cv7HlrNb4dPx6Dbt9zeFHyxDRLllycf0c0tlFp/x+c5kG rowoSCVL1K4f74qE9SV91ZBoS6bgzVzenHS4YfOA0pBSktJr6veK4mmofs2THfkH6hf7 My3rqJ3hHopNzn27HlijmuI+WTdIORnYeBRRdFwU5CDxEQzd54M4c9ALJql4HaVCsRKF mBheNs0ki3sKMyVNW22wsQehDB89uwxMKtBdnz6sGKfIgoo7Ak/QK5NAuK5y44ork5c/ MlV6podMmRlzYgQthAI1DESZdEh/jmPG6hg9s1CWXrtYALak23ZYKpgyL6aU9+t7R3yP fA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2h0vumg4k6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Mar 2018 09:03:30 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2T93UCF019709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Mar 2018 09:03:30 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2T93S8X014248; Thu, 29 Mar 2018 09:03:29 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Mar 2018 02:03:28 -0700 Date: Thu, 29 Mar 2018 12:03:19 +0300 From: Dan Carpenter To: Jaroslav Kysela , Ruslan Bilovol Message-ID: <20180329090319.GB17927@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8846 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=899 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803290092 Cc: Greg Kroah-Hartman , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, Takashi Iwai Subject: [alsa-devel] [PATCH] ALSA: usb-audio: silence a static checker warning X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP We recently made "format" a u64 variable so now static checkers complain that this shift will wrap around if format is more than 31. I don't think it makes a difference for runtime, but it's simple to silence the warning. Signed-off-by: Dan Carpenter diff --git a/sound/usb/format.c b/sound/usb/format.c index edbe67eeddfa..49e7ec6d2399 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -55,7 +55,7 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip, struct uac_format_type_i_discrete_descriptor *fmt = _fmt; sample_width = fmt->bBitResolution; sample_bytes = fmt->bSubframeSize; - format = 1 << format; + format = 1ULL << format; break; }