Message ID | 20221101174255.54452-2-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3118044wru; Tue, 1 Nov 2022 10:58:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5qQ+WmRmjF/bh5GmxPdGDkFgYZe10LYlO7sdK9f12wlnqH1IWgqotIWaHZmveCO2RjvSek X-Received: by 2002:a05:6402:3457:b0:463:2017:ae64 with SMTP id l23-20020a056402345700b004632017ae64mr16254426edc.218.1667325506313; Tue, 01 Nov 2022 10:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667325506; cv=none; d=google.com; s=arc-20160816; b=DyCwWXggwouLK17pbtlXqSb4kqAUWTXZP7MWlYmikb3qhCSkernyRXqceimRoLc+Ag MH9YX04ccYe8zUDUZuuAIQ5ARNZp5C0vi1eoFG2PHPP7OXiAP9ZZpj/MK/NqSzkQ0Yct LE79+HuSdjUsmznUU6KaMtGYc7VH/8UzFfoDg4dqkbVsE6UDYh7dtuS8TyPRirItC8+a reGfeMxgOL9Dh0EsnTiRaSLf0CFEU6AaqoLEObDCQlaLYHGMCMEoykvoF0pz1bfFFHni BO4qe9jr3rALrUQjvX8NuHFMArvz5kKQ0SOjSkcs/Ur/xfYZJC+kZ3J22dqMcdz77w8+ dppQ== 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=HEUiHc3BepZuFlGCqCQWhynG2hvpPI9P6H+Mmkh1zoY=; b=vJRp6NPWvRM6tLPV5CJLAJfc71Czs79J9W7+k4EqP4pHU4pQsvO/qtKIUGzHKExPOa 2xSBmuqE6J/L4iMiG6x+5Qn87EDxQ4TxFdglHk5HwbtQ9bqJVrR5mKO4bBs3DyqmILuA wIVRtdHnyB/xqV9miDU3W2lyMcJxGtprK3IN5Z/Wb/+L7xF2FT3kp7Htz315bJ0UBvYd yWKWGp7jPXzot37ONKFQe1JbYAyjexlTa0bAuX52QDtCtzwFXxMkEo57tq8EPz3PYQMJ DIXePFe/tGagr7HmQiGYuWO5ivHUB349IRf2sXxnoZl0AXrRXGQjraDSSkVSowXbboLo an/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iJSkEHUZ; 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 k14-20020a170906a38e00b007803449809esi9623760ejz.355.2022.11.01.10.58.02; Tue, 01 Nov 2022 10:58:26 -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=iJSkEHUZ; 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 S231244AbiKARms (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 1 Nov 2022 13:42:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230435AbiKARmi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Nov 2022 13:42:38 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EAAB1CB08; Tue, 1 Nov 2022 10:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667324558; x=1698860558; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F1q8w57mHPaiy0oFIx6dL3sLIgTgPFyzkabGHkE+Pbc=; b=iJSkEHUZQ80xSdg39ECByhFTNzrHmEvw8DSAsj/dlRlse1IiSyRX000p VU0EgYah5iHP34oZMH8E2/shn0CdaBnU/AarVMHraz1O8Ro5i1vHK+z/m cv79dJcu2PrsCnJL8RHZm6H/BO17K0kd6iVDaVNbbST5osAbxQmGww+cV JiY5IVEqIWA7dinya60RUSwoRiUwrt/L3ait5RT39o9/oEEi/JwGIlBGw O9WFwW0vEFhtrn8l6ZfYLo8P6b0p4p3oAEYTG5X/vxylKmegFmg1Xq9kX trZpCTn4p7EwLrt9+VjW3Ns37xrBWkwirnGHcFGucTsKO+etum8nQgUiZ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="310909165" X-IronPort-AV: E=Sophos;i="5.95,231,1661842800"; d="scan'208";a="310909165" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2022 10:42:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="667272869" X-IronPort-AV: E=Sophos;i="5.95,231,1661842800"; d="scan'208";a="667272869" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 01 Nov 2022 10:42:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E71DCD0; Tue, 1 Nov 2022 19:42:57 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Thierry Reding <thierry.reding@gmail.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Subject: [PATCH v1 2/3] pwm: core: Drop unneeded casting in pwm_seq_show() Date: Tue, 1 Nov 2022 19:42:54 +0200 Message-Id: <20221101174255.54452-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221101174255.54452-1-andriy.shevchenko@linux.intel.com> References: <20221101174255.54452-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748317509974804745?= X-GMAIL-MSGID: =?utf-8?q?1748317509974804745?= |
Series |
[v1,1/3] pwm: core: Refactor pwmchip_add() to avoid extra checks
|
|
Commit Message
Andy Shevchenko
Nov. 1, 2022, 5:42 p.m. UTC
The casting form void * to char * is not needed and done implicitly.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pwm/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, Nov 01, 2022 at 07:42:54PM +0200, Andy Shevchenko wrote:
> The casting form void * to char * is not needed and done implicitly.
This patch is wrong and it seems I have tried something like this in the past.
The rest in the series is okay.
Hi Andy, I love your patch! Perhaps something to improve: [auto build test WARNING on thierry-reding-pwm/for-next] [also build test WARNING on linus/master v6.1-rc3 next-20221101] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pwm-core-Refactor-pwmchip_add-to-avoid-extra-checks/20221102-014412 base: https://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git for-next patch link: https://lore.kernel.org/r/20221101174255.54452-2-andriy.shevchenko%40linux.intel.com patch subject: [PATCH v1 2/3] pwm: core: Drop unneeded casting in pwm_seq_show() config: i386-randconfig-a013 compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/5e2a7f06a8d355d7dcc059703bb5990ae6358fef git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Andy-Shevchenko/pwm-core-Refactor-pwmchip_add-to-avoid-extra-checks/20221102-014412 git checkout 5e2a7f06a8d355d7dcc059703bb5990ae6358fef # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/pwm/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): >> drivers/pwm/core.c:1192:46: warning: format specifies type 'char *' but the argument has type 'void *' [-Wformat] seq_printf(s, "%s%s/%s, %d PWM device%s\n", s->private, ~~ ^~~~~~~~~~ 1 warning generated. vim +1192 drivers/pwm/core.c 1187 1188 static int pwm_seq_show(struct seq_file *s, void *v) 1189 { 1190 struct pwm_chip *chip = list_entry(v, struct pwm_chip, list); 1191 > 1192 seq_printf(s, "%s%s/%s, %d PWM device%s\n", s->private, 1193 chip->dev->bus ? chip->dev->bus->name : "no-bus", 1194 dev_name(chip->dev), chip->npwm, 1195 (chip->npwm != 1) ? "s" : ""); 1196 1197 pwm_dbg_show(chip, s); 1198 1199 return 0; 1200 } 1201
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 855abd0a776f..36128f3301ac 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -1158,7 +1158,7 @@ static int pwm_seq_show(struct seq_file *s, void *v) { struct pwm_chip *chip = list_entry(v, struct pwm_chip, list); - seq_printf(s, "%s%s/%s, %d PWM device%s\n", (char *)s->private, + seq_printf(s, "%s%s/%s, %d PWM device%s\n", s->private, chip->dev->bus ? chip->dev->bus->name : "no-bus", dev_name(chip->dev), chip->npwm, (chip->npwm != 1) ? "s" : "");