From patchwork Wed Jul 5 02:54:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Colberg, Peter" X-Patchwork-Id: 115921 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1593961vqx; Tue, 4 Jul 2023 20:09:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlHu1W8LKQJKI8CmhgjPvpPi6COB5rZ4B2ttBZr2gWg1dL85lLVMT0uPj0h1PoBDghGz+SkE X-Received: by 2002:a81:93c7:0:b0:56f:fbc6:3b0 with SMTP id k190-20020a8193c7000000b0056ffbc603b0mr15366035ywg.14.1688526558744; Tue, 04 Jul 2023 20:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688526558; cv=none; d=google.com; s=arc-20160816; b=dI2144xG9UxSMZvxTtMuVQ952h5HBePiCpy+gkj2tNkzcBL8C5qe5HoBtxjaTpULYp e/eH7NRr+hutWopdpkjkdHLNEOeRrlrR/pL0T9DwbvIolXysUFIH5po9c99H9fVumhFZ Xy93cu22uJh1IQuLtqLmHmu7xVcNG0AvmjlyrSWTHHk6GrjPYUGQv69MnP4pJcqx3yTG Kfv7TNYhrhI7imRzo6VWKN4fzFO+bUE6s/mO3TTOaxuZhFqV5RIGBuBc5Syy40Ol31fR T3XE6GyDmm7+Bf+NdvwyDY7LVI2C3JNwVuGihK9j35TknhtYF5dwIufWc71aC+HUGyXs 8QKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HKuzvg8COCbZsJNTWKxSgPS3wjxSAf7rNu/6t53D2mo=; fh=GHzV6gjveynZvs7pDNWyXWBvpts/SKuvny2fbnydznQ=; b=HBfWdmuTQwhLM9lyaP5lEI1afB36VJFdscn3tx8vPeisygnZbiyTnJigKZ62xXI5o7 V0Ar3Sd5adW5MsoS2HrtGwKxob0D85DbazEgX0WJmJCpXHKlrNd6i7K2Jw9qxeubxtAA EHMbFTApGsldo/VrCqr1hFWzmr4hO9UlOuuV4a5ojBvyUqaVk93sKHV1jf3ACRlzTw8t j2fpZkEts1BfvOxiCPkbz7rkG33GPgRqSvotwNoMqPoQ/PcNnjZQPp5iEdTpWbqHPAT/ vXqO0gI8YNbEpUQhV5KnU3jc7UJ749Bcz46Jq+qOlc5mkSvztx/3pAIARTPcC8wj9wEz 6nLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mOc+cH68; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x34-20020a634a22000000b0054ff42d3833si22503579pga.336.2023.07.04.20.09.05; Tue, 04 Jul 2023 20:09:18 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=mOc+cH68; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230417AbjGECzS (ORCPT + 99 others); Tue, 4 Jul 2023 22:55:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230437AbjGECzO (ORCPT ); Tue, 4 Jul 2023 22:55:14 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E60BC10FB; Tue, 4 Jul 2023 19:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688525713; x=1720061713; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1Jl+5/3iICde90mhWtlEKUB3c1yzRXMoUe/SxfyPzYs=; b=mOc+cH68RubjJh9mCFEEGGpJCoP2Rr7Wl04dqEEOss+9194Z2Pc10OsH oM/8DI8Nb7ac80DvzlkJKUUrMPppTvhhLeqniPg11vLp8I+tXwvXXWjEb IMjPR3nQ2PRu0gVI3WAnm3RRR43zVYNp1S1NxGGMrIWOIkR1KGrFAy682 lL0iGBk11of+fmaGYYxvvjVutLuhzbo8hU+ixSeeWtwQQOXdiVYztj6rG dOwbYl/weQerRLY3p0vOBCKH7O4hRft/Bvk89PLvAOn2a9XeurfGeaFsL Zjpk628N/x5VRQ/PAPT/37jfIfO1sVaeu3oa/RgmleYMELiSRZ1pq0nhz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="343567180" X-IronPort-AV: E=Sophos;i="6.01,181,1684825200"; d="scan'208";a="343567180" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2023 19:55:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="754206085" X-IronPort-AV: E=Sophos;i="6.01,181,1684825200"; d="scan'208";a="754206085" Received: from scc823097.zsc7.intel.com ([10.148.153.229]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2023 19:55:13 -0700 From: Peter Colberg To: Wu Hao , Tom Rix , Moritz Fischer , Xu Yilun , linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko , tianfei.zhang@intel.com, russell.h.weight@intel.com, matthew.gerlach@linux.intel.com, marpagan@redhat.com, lgoncalv@redhat.com, Peter Colberg Subject: [PATCH 2/2] fpga: dfl: omit unneeded casts of u64 values for dev_dbg() Date: Tue, 4 Jul 2023 22:54:51 -0400 Message-Id: <0cffb04a207a98148c61f512aa4dc90880e51251.1687301688.git.peter.colberg@intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770548424812740109?= X-GMAIL-MSGID: =?utf-8?q?1770548424812740109?= Omit unneeded casts of u64 values to unsigned long long for use with printk() format specifier %llx. Unlike user space, the kernel defines u64 as unsigned long long for all architectures; see commit 2a7930bd77fe ("Documentation/printk-formats.txt: No casts needed for u64/s64"). These changes are cosmetic only; no functional changes. Suggested-by: Andy Shevchenko Signed-off-by: Peter Colberg Reviewed-by: Andy Shevchenko --- drivers/fpga/dfl-afu-dma-region.c | 14 ++++++-------- drivers/fpga/dfl-afu-main.c | 4 +--- drivers/fpga/dfl-fme-mgr.c | 5 ++--- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/fpga/dfl-afu-dma-region.c b/drivers/fpga/dfl-afu-dma-region.c index 02b60fde0430..71ed9d394d07 100644 --- a/drivers/fpga/dfl-afu-dma-region.c +++ b/drivers/fpga/dfl-afu-dma-region.c @@ -146,8 +146,7 @@ static int afu_dma_region_add(struct dfl_feature_platform_data *pdata, struct dfl_afu *afu = dfl_fpga_pdata_get_private(pdata); struct rb_node **new, *parent = NULL; - dev_dbg(&pdata->dev->dev, "add region (iova = %llx)\n", - (unsigned long long)region->iova); + dev_dbg(&pdata->dev->dev, "add region (iova = %llx)\n", region->iova); new = &afu->dma_regions.rb_node; @@ -187,8 +186,7 @@ static void afu_dma_region_remove(struct dfl_feature_platform_data *pdata, { struct dfl_afu *afu; - dev_dbg(&pdata->dev->dev, "del region (iova = %llx)\n", - (unsigned long long)region->iova); + dev_dbg(&pdata->dev->dev, "del region (iova = %llx)\n", region->iova); afu = dfl_fpga_pdata_get_private(pdata); rb_erase(®ion->node, &afu->dma_regions); @@ -210,7 +208,7 @@ void afu_dma_region_destroy(struct dfl_feature_platform_data *pdata) region = container_of(node, struct dfl_afu_dma_region, node); dev_dbg(&pdata->dev->dev, "del region (iova = %llx)\n", - (unsigned long long)region->iova); + region->iova); rb_erase(node, &afu->dma_regions); @@ -255,7 +253,7 @@ afu_dma_region_find(struct dfl_feature_platform_data *pdata, u64 iova, u64 size) if (dma_region_check_iova(region, iova, size)) { dev_dbg(dev, "find region (iova = %llx)\n", - (unsigned long long)region->iova); + region->iova); return region; } @@ -268,8 +266,8 @@ afu_dma_region_find(struct dfl_feature_platform_data *pdata, u64 iova, u64 size) break; } - dev_dbg(dev, "region with iova %llx and size %llx is not found\n", - (unsigned long long)iova, (unsigned long long)size); + dev_dbg(dev, "region with iova %llx and size %llx is not found\n", iova, + size); return NULL; } diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl-afu-main.c index 51fdbe8a2f26..f81b44767c31 100644 --- a/drivers/fpga/dfl-afu-main.c +++ b/drivers/fpga/dfl-afu-main.c @@ -729,9 +729,7 @@ afu_ioctl_dma_map(struct dfl_feature_platform_data *pdata, void __user *arg) } dev_dbg(&pdata->dev->dev, "dma map: ua=%llx, len=%llx, iova=%llx\n", - (unsigned long long)map.user_addr, - (unsigned long long)map.length, - (unsigned long long)map.iova); + map.user_addr, map.length, map.iova); return 0; } diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl-fme-mgr.c index af0785783b52..7fb7a0aca1dc 100644 --- a/drivers/fpga/dfl-fme-mgr.c +++ b/drivers/fpga/dfl-fme-mgr.c @@ -150,7 +150,7 @@ static int fme_mgr_write_init(struct fpga_manager *mgr, priv->pr_error = fme_mgr_pr_error_handle(fme_pr); if (priv->pr_error) dev_dbg(dev, "previous PR error detected %llx\n", - (unsigned long long)priv->pr_error); + priv->pr_error); dev_dbg(dev, "set PR port ID\n"); @@ -242,8 +242,7 @@ static int fme_mgr_write_complete(struct fpga_manager *mgr, dev_dbg(dev, "PR operation complete, checking status\n"); priv->pr_error = fme_mgr_pr_error_handle(fme_pr); if (priv->pr_error) { - dev_dbg(dev, "PR error detected %llx\n", - (unsigned long long)priv->pr_error); + dev_dbg(dev, "PR error detected %llx\n", priv->pr_error); return -EIO; }