From patchwork Fri Oct 22 23:32:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12579177 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74A55C433F5 for ; Fri, 22 Oct 2021 23:32:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B80B60FE3 for ; Fri, 22 Oct 2021 23:32:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232008AbhJVXfL (ORCPT ); Fri, 22 Oct 2021 19:35:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbhJVXfK (ORCPT ); Fri, 22 Oct 2021 19:35:10 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D975C061764; Fri, 22 Oct 2021 16:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=mvgazD9x12sIYpUGEvDFNeSjpKlhGbYxfsRm+y6UoMQ=; b=YWSpEHWXg/cmTacEC9Ikl/7Xc1 LDg2kS6QHEnSDgzHN7OoYPgUw2SCcn4kyWz/7hBwvO1/r0CrOLWUeZWko7BlcIEHyPCorMAnIpIkT URNn11q7aSAi4416vTSt2xgJvFHumgpHX2F7lV7CP8dlpUZXHvxQtuvcvIV5PCmKrjroMsVevY7Y9 MIXjvQIbHau6EdhsnTk2T5eoCuZZOLb5ub97PrMseDtMVpg5dHJx6jUxWhD7SxTpo2bUYMcuZ2VTN Ozg1pyQaheENfgcXt7ythIofUEnH8lHfI25cv9nt42IZvZ6P40FlD4+a7vpxAk9mQ8sRYPg22eHs5 48TO2SNA==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1me41r-00C8As-Ts; Fri, 22 Oct 2021 23:32:52 +0000 From: Randy Dunlap To: netdev@vger.kernel.org Cc: Randy Dunlap , Sean Wang , linux-wireless@vger.kernel.org, Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Kalle Valo Subject: [PATCH net] wireless: mediatek: mt7921: fix Wformat build warning Date: Fri, 22 Oct 2021 16:32:51 -0700 Message-Id: <20211022233251.29987-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org ARRAY_SIZE() is of type size_t, so the format specfier should be %zu instead of %lu. Fixes this build warning: ../drivers/net/wireless/mediatek/mt76/mt7921/main.c: In function ‘mt7921_get_et_stats’: ../drivers/net/wireless/mediatek/mt76/mt7921/main.c:1024:26: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=] dev_err(dev->mt76.dev, "ei: %d SSTATS_LEN: %lu", Signed-off-by: Randy Dunlap Cc: Sean Wang Cc: linux-wireless@vger.kernel.org Cc: Felix Fietkau Cc: Lorenzo Bianconi Cc: Ryder Lee Cc: Kalle Valo --- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20211022.orig/drivers/net/wireless/mediatek/mt76/mt7921/main.c +++ linux-next-20211022/drivers/net/wireless/mediatek/mt76/mt7921/main.c @@ -1021,7 +1021,7 @@ void mt7921_get_et_stats(struct ieee8021 ei += wi.worker_stat_count; if (ei != ARRAY_SIZE(mt7921_gstrings_stats)) - dev_err(dev->mt76.dev, "ei: %d SSTATS_LEN: %lu", + dev_err(dev->mt76.dev, "ei: %d SSTATS_LEN: %zu", ei, ARRAY_SIZE(mt7921_gstrings_stats)); }