Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1209328pxf; Fri, 26 Mar 2021 03:30:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyS6d1EudorWzFWqJYlY/r1qZ7NKqcYkoELVk41whb4yl8RwYI0thUmBCarpKNlhBz5WNt2 X-Received: by 2002:a17:906:4e91:: with SMTP id v17mr14424911eju.331.1616754658440; Fri, 26 Mar 2021 03:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616754658; cv=none; d=google.com; s=arc-20160816; b=J62b7OUxC2XgsqIVrmCrgcAws9HmkQQCmDJJ/YgSH0iokSl5ykekxD8camfr5Eyk0L GOi26fRFoMv2EoH2BwtF4HrxW0OrzhKNdI2gvT94NWGLK2aVcaNkawHqBe07EN/Uu9rI lKa9EqdKS0AgiuGGTJItoSa+i4vH5a5GpiTYx53a85cwDlTbh7mGQyfdNAVEeBDlJwr2 AWLzqpB/glqdGpu7cQIJfv2mqufjbvikZiZz4mcQypDXpOVr0JwL87Mr3+WMQD8fESVx Ivs2fq72kQksSj4TW4K605pvaUi5Fwva7U3BNRt7g/1+engnJnxX2ZSJubDukY51VfW+ jaCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Vo5iYrzqAVwD0ftnJcNS6Tk8fjUEFpVW310k0kRUZFQ=; b=YoSJDp4DwOFOqEQGCiTJELlJSxn1BRP63X6TcPCAGDDn6tS1e5Xp93m1/zRQgSZGzq FESlKShW/sUTLP6BaPflEzmsCh0lBTXFn2P5Rb4Fjhn4bDSvnT2AlJs6bFi6cwSFQvGV z7tREnKmPUokF7MyOveNpnNkms0K5H2xCzrJQAwPcTZdhWB42lKsYZULe1OKyAyCwmV5 JgMXuWcIqjtYz8Nhj2XR4gbaEs/bZANl4esHyokI3uNp4o/A8CLlH/oq5mluez+Em23A +MUSSQAvFdzcChdj2VCHTFI0aGDheTDk6VXt0Je9Et6dO8N3Q9vxoRtJJ+oDK0fy34Ki 5eRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si6062835edc.6.2021.03.26.03.30.35; Fri, 26 Mar 2021 03:30:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230059AbhCZK3K (ORCPT + 99 others); Fri, 26 Mar 2021 06:29:10 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:52568 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbhCZK2n (ORCPT ); Fri, 26 Mar 2021 06:28:43 -0400 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 5F37A20185; Fri, 26 Mar 2021 11:28:41 +0100 (CET) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nlpR4qj043xz; Fri, 26 Mar 2021 11:28:36 +0100 (CET) Received: from cas-essen-02.secunet.de (unknown [10.53.40.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 190E720569; Fri, 26 Mar 2021 11:28:36 +0100 (CET) Received: from mbx-essen-01.secunet.de (10.53.40.197) by cas-essen-02.secunet.de (10.53.40.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 26 Mar 2021 11:28:35 +0100 Received: from gauss2.secunet.de (10.182.7.193) by mbx-essen-01.secunet.de (10.53.40.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 26 Mar 2021 11:28:35 +0100 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 156863180307; Fri, 26 Mar 2021 11:28:35 +0100 (CET) Date: Fri, 26 Mar 2021 11:28:35 +0100 From: Steffen Klassert To: Arnd Bergmann CC: , Herbert Xu , "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , "Zhang Changzhong" , Sabrina Dubroca , Willem de Bruijn , Jiapeng Chong , , Subject: Re: [PATCH net-next] ipv6: fix clang Wformat warning Message-ID: <20210326102835.GB62598@gauss3.secunet.de> References: <20210322115701.4035289-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20210322115701.4035289-1-arnd@kernel.org> X-ClientProxiedBy: cas-essen-02.secunet.de (10.53.40.202) To mbx-essen-01.secunet.de (10.53.40.197) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 12:56:49PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > When building with 'make W=1', clang warns about a mismatched > format string: > > net/ipv6/ah6.c:710:4: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] > aalg_desc->uinfo.auth.icv_fullbits/8); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/printk.h:375:34: note: expanded from macro 'pr_info' > printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) > ~~~ ^~~~~~~~~~~ > net/ipv6/esp6.c:1153:5: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] > aalg_desc->uinfo.auth.icv_fullbits / 8); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/printk.h:375:34: note: expanded from macro 'pr_info' > printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) > ~~~ ^~~~~~~~~~~ > > Here, the result of dividing a 16-bit number by a 32-bit number > produces a 32-bit result, which is printed as a 16-bit integer. > > Change the %hu format to the normal %u, which has the same effect > but avoids the warning. > > Signed-off-by: Arnd Bergmann Applied to ipsec-next, thanks!