Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1026638imw; Fri, 15 Jul 2022 18:55:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uWq37+Mjt1CmIFfc46K9mHD/kN7X71sbXCF2yoY26EJdhxB6iIm5WpE8TdGwWijBefhsWu X-Received: by 2002:a17:907:3f02:b0:6f3:5c42:321a with SMTP id hq2-20020a1709073f0200b006f35c42321amr15873968ejc.521.1657936502653; Fri, 15 Jul 2022 18:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657936502; cv=none; d=google.com; s=arc-20160816; b=WXgxe3fFEupJvy6uEgeVFH6scsklSBgshPkXHD0uC6227lTx2OQ/eY/uIWT4tl1z8+ q30XUmFs+nWnLvztT/WJX8G+pKN+NDwOQ7SBcSiopZXiqb405IxjEZmfGdKtt6bLDTAH s5MajU1/CfZ0jllPu0z90qMzoPTwRLt/q39WGT0LyQSx4v0nyOCZmn25CtcM0PFRSMfk sCa/Pj0e6NyQO8Qh73GmxKe0wx2poWB3HrOX3gk/v1nyphWZyolu+tbyeYRX2udPPHks A1Z9iSqK2YeE07qymEbM4NSnTGnS5Fd3+1ziS2x0Hf8xWTTYVYgqRjpysFnqL2sooYIc gZPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=Rg8GrqEDAQcI7mzTUxUWzp8edL1SM9lTV04eYRyy5PM=; b=vZMC3tYu/wAwU0/tyEutU12Oe8qQyjUA9eWbvJWXFkP8qC+EPR9jp0Cgz3O0vuygLS mwOj1AhwJFyr6snrjzu/ozkuKyf7ENMiTk7oSJCdV+cQKCjwrwGXxD7j+NFbEva1/BNn ouz7cEyLDzFya/fBIMBm1svYRqwGqtXK5QpmFfd8vlNkCBuwbdZdcNTiF7bp5StxQUVE 1Ak+eN/ZDKvMTEQ9bRko5cvkp7uzS5D56mp9KblLEEPOMOrV/8NNw6P6dacLfDTgbbxt bi9PuoeeehDkC6G+C7tx7ukSUq9nKF0txvf7+8DqUHGl3+72z3wsUciKbczES35KX/BG aIZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l24-20020a1709066b9800b00718d1602f6fsi7574232ejr.813.2022.07.15.18.54.19; Fri, 15 Jul 2022 18:55:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229625AbiGPBko convert rfc822-to-8bit (ORCPT + 99 others); Fri, 15 Jul 2022 21:40:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230003AbiGPBkn (ORCPT ); Fri, 15 Jul 2022 21:40:43 -0400 Received: from relay3.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8257691CC4 for ; Fri, 15 Jul 2022 18:40:42 -0700 (PDT) Received: from omf07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 46EA234AD8; Sat, 16 Jul 2022 01:40:40 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA id EC0D22002F; Sat, 16 Jul 2022 01:40:36 +0000 (UTC) Message-ID: Subject: Re: [PATCH] mediatek: mt7601u: fix clang -Wformat warning From: Joe Perches To: Justin Stitt Cc: Jakub Kicinski , Kalle Valo , "David S . Miller" , Eric Dumazet , Paolo Abeni , Matthias Brugger , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Date: Fri, 15 Jul 2022 18:40:36 -0700 In-Reply-To: References: <20220711212932.1501592-1-justinstitt@google.com> <84e873c27f2426ce003e650004fe856bf72c634b.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.1-0ubuntu1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Stat-Signature: 9arxp8zrxrtfhr9woubqw46ao9rxwyoi X-Rspamd-Server: rspamout08 X-Rspamd-Queue-Id: EC0D22002F X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX188ldYAO7JJ3DMtC38rgMW1rKWpcluwGBk= X-HE-Tag: 1657935636-65764 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2022-07-15 at 17:08 -0700, Justin Stitt wrote: > On Thu, Jul 14, 2022 at 11:33 PM Joe Perches wrote: > > > > On Mon, 2022-07-11 at 14:29 -0700, Justin Stitt wrote: > > > When building with Clang we encounter this warning: > > > > drivers/net/wireless/mediatek/mt7601u/debugfs.c:92:6: error: format > > > > specifies type 'unsigned char' but the argument has type 'int' > > > > [-Werror,-Wformat] dev->ee->reg.start + dev->ee->reg.num - 1); [] > > I suggest s/%hh/%/ for all the uses here, not just this one. > > I also contemplated this change but I think it might be a bit out of > scope for https://github.com/ClangBuiltLinux/linux/issues/378 -- What > do you think? It would not be out of scope. > It could be argued that every single instance of %hh[dux] should be > replaced with %[dux]. All the vsprintf ones, but not the scanf ones.