From patchwork Mon May 21 18:45:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10416209 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 36338600CC for ; Mon, 21 May 2018 18:47:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 253BC289E2 for ; Mon, 21 May 2018 18:47:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 195A7289DF; Mon, 21 May 2018 18:47:59 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC5EC289DF for ; Mon, 21 May 2018 18:47:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751234AbeEUSrG (ORCPT ); Mon, 21 May 2018 14:47:06 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:34754 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbeEUSqi (ORCPT ); Mon, 21 May 2018 14:46:38 -0400 Received: by mail-qt0-f196.google.com with SMTP id m5-v6so20229317qti.1; Mon, 21 May 2018 11:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qSztK4+ZlkY7FssB74dd1kSMeEoTLIJJynJUf6DiYCE=; b=BnjNpVBJmU7Ppuco5fabA6apy9kahh5x4C4XhkAkJQACSJVbhzYkEzm/5sCUo5VBgW LvKZhd8YwaYMpoymxYvD5bm1DxTmVx4zX8hYxu3ETVQdrVlWtVE/sNJgYkhGO7yh8JCW UR6UoZSfKSqYkNEQICNzxHcOxa/Z7LYHmfz8mm4cXIWsGdreI/A8ZfdOOf4MbdJnukFV MYT6F530tPkU+rV/hgpiHdZCSCSW68Dzhz/uTypo87enghfA2Ec9SdcCu/LrcxSPPXBw hT61bMuCvRKYhm2pToStcV9cZu8WX/cFgomUX6aDUpCrauVYaq/39DTvPQaIHhZxfnL8 /Dmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qSztK4+ZlkY7FssB74dd1kSMeEoTLIJJynJUf6DiYCE=; b=KGKNKcivawmGlV2aCxWVOLceh0iiG5ZZBDcWowUpW/kFpxko4sOySTw4QEopBv6/oD HStFQTUDU0XoYLLZGt11406N7qvFb1PmA0xNqmjEneo2YbHrnWcOF52wfSTpbFjtIdGB MeE3rfd9DqqQowm4N3SEWCp+GXy0ZIctkgREZqd0T7R6XOuIVbS2bBXRJmaTxJwbKqit mzwNizp7nvO9tWakL2k7ekg8Yyz0vw4yJ1CXKsUZ190CvxjC1y1yGJ49I1OVgEPhatfc Iltlq/FQ2gfMsvWh0YFo5lf3TVfVPN2+wrMTnha3hSOF8a9FcQ29wCKSXcyXPfTkWUS3 wTvA== X-Gm-Message-State: ALKqPweFvXN8V4rHJtE07YsC0xUE0WbgNU3UpmfvC9ofGWw4XKq4sNC+ unrCmFzvcxV4kse2yrhOyFs5ZDCN X-Google-Smtp-Source: AB8JxZpOtnIkzViBPV3UaqV/UOXrcZ+ylspi6K/pEq+IhQ5LNLFZV/plYKGfQvqbTrA2i65AODfpxw== X-Received: by 2002:ac8:f71:: with SMTP id l46-v6mr19444521qtk.45.1526928397442; Mon, 21 May 2018 11:46:37 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id s186-v6sm10197885qkb.53.2018.05.21.11.46.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 11:46:36 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , Grygorii Strashko , "David S. Miller" , Ivan Khoronzhuk , Andrew Morton , Keerthy , Bhumika Goyal , =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= , Richard Cochran , Lukas Wunner , Rob Herring , linux-omap@vger.kernel.org (open list:TI ETHERNET SWITCH DRIVER (CPSW)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH net-next 3/5] net: ethernet: ti: cpsw: Fix cpsw_add_ch_strings() printk format Date: Mon, 21 May 2018 11:45:53 -0700 Message-Id: <20180521184555.21555-4-f.fainelli@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180521184555.21555-1-f.fainelli@gmail.com> References: <20180521184555.21555-1-f.fainelli@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When building on a 64-bit host we will get the following warning: drivers/net/ethernet/ti/cpsw.c: In function 'cpsw_add_ch_strings': drivers/net/ethernet/ti/cpsw.c:1284:19: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=] "%s DMA chan %d: %s", rx_dir ? "Rx" : "Tx", ~^ %ld Fix this by using an %ld format and casting to long. Fixes: e05107e6b747 ("net: ethernet: ti: cpsw: add multi queue support") Signed-off-by: Florian Fainelli --- drivers/net/ethernet/ti/cpsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index a7285dddfd29..643cd2d9dfb6 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1281,8 +1281,8 @@ static void cpsw_add_ch_strings(u8 **p, int ch_num, int rx_dir) for (i = 0; i < ch_stats_len; i++) { line = i % CPSW_STATS_CH_LEN; snprintf(*p, ETH_GSTRING_LEN, - "%s DMA chan %d: %s", rx_dir ? "Rx" : "Tx", - i / CPSW_STATS_CH_LEN, + "%s DMA chan %ld: %s", rx_dir ? "Rx" : "Tx", + (long)(i / CPSW_STATS_CH_LEN), cpsw_gstrings_ch_stats[line].stat_string); *p += ETH_GSTRING_LEN; }