Message ID | 20221108142226.63161-3-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 l7csp2741196wru; Tue, 8 Nov 2022 06:28:40 -0800 (PST) X-Google-Smtp-Source: AMsMyM6KzExzkeM05RJ/OWHNcK1t5uGHFBKFRpyOY4MgO3vr6gs9sJxuvSUcC6IjmKFSITZaHRE6 X-Received: by 2002:a05:6a00:852:b0:56d:e2bc:1978 with SMTP id q18-20020a056a00085200b0056de2bc1978mr37584570pfk.47.1667917720264; Tue, 08 Nov 2022 06:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667917720; cv=none; d=google.com; s=arc-20160816; b=sGXViMmGvDgpZOoEHpX+VClNqGjyBGgMN2BxI5DsyQPuxajaxUc/O2CZgu8xnzye+w B1woP1bbkJmidnwa9vb3qBTMuxYdl8uJzqY6QzOpwnrIV7AVjpCnYhumwnd5hsPNI+TF UQsSKHbSE0G1/0DQ6VrLE6MPPZw3IgEPTkjqRlWmui5Eex3iweRXzGF+22G0WJRx1lPJ fPHjvJNa/K+RC7+L4VabcaH8wpJ9ff3OlUtPYDfZzTXuEWe1nMsmIu9MAfN1HwkU0onY KYZI0TdZdM64Vd7Qi+BqxxTZmQIH5b8W6hFPu3YA2LF+x1FISJ4AkWoH6pqg+9Tx90uo qF8g== 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=AeNEMyQ3Y6oWtuh/ijlUtJQIoeOGCjlVRGN+T3yRZok=; b=qrAggX88u6/ZxxhpSU923j5mWv9rp16jweNawR+vCXQDlOKOd6XQ0rQnz8Q6hiB87o KFAipiKL/nD4jFOeW5xhFcrzlvuyYqTkzTHOGVIUAL6iF7B4J+th9pPYwDPBmA/A3Ed+ HdW5iDls5elenXcxXODj3FfLAN+EG21Qh37qYp973AUgHeongDLpawuefdnJPT1+qVM0 HjI8WwkViUC3bu7aZN7Tsp0t0oj2+iy3hRDo6wnWePxBx7Gr51/Q+cBIZGivwYyITidy 7uTnfm5WFfr4cTQCVP8ZoJ5VTY8HYbHphJAgGC9TyNbXurBzsbETM8hg/fUa45SMK+d/ j4Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IY8eOGG5; 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 d6-20020a630e06000000b0041b7a0b673fsi14197633pgl.449.2022.11.08.06.28.25; Tue, 08 Nov 2022 06:28:40 -0800 (PST) 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=IY8eOGG5; 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 S234589AbiKHOXD (ORCPT <rfc822;tony84727@gmail.com> + 99 others); Tue, 8 Nov 2022 09:23:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234352AbiKHOWT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 8 Nov 2022 09:22:19 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 809DE54B2F; Tue, 8 Nov 2022 06:22:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667917338; x=1699453338; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=E9ags/i2eDk5WiEL1lMfAOWBo+2EbAcbpeazBtcJaqI=; b=IY8eOGG5AbGU/thfTYtpls063zxVpV5GhebaF0WBpN2XhwgrSwOyfsur BRM61jpRSb4AobgbzZ+yG5nimeoU1d1v7Do86xiHmC/G6KJi9qOS9BQFv Qq0ImAW8CxPffvRmL9vCtmOQK75sXKwYmaphjjLea5UZdu4zkguVYJrow LSzqAE0zazYMulRy5y+mGWyHYLPYZrqlMDX4xmUDu1B973kBe9+nAcEVm 4RiIabUdg2lD8fJ1L1iTbSY48pDbzWmsXUNXTS4XlIgxeoAC8SUWH2RFK pjS4y4T6biqEi/Id9/ILyH35ko5Mtlxx6KC4MU05w0g7TJaUAUJA3qmy4 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="310700753" X-IronPort-AV: E=Sophos;i="5.96,148,1665471600"; d="scan'208";a="310700753" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2022 06:22:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="587386418" X-IronPort-AV: E=Sophos;i="5.96,148,1665471600"; d="scan'208";a="587386418" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 08 Nov 2022 06:22:03 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 75ED429D; Tue, 8 Nov 2022 16:22:27 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Mika Westerberg <mika.westerberg@linux.intel.com>, Hans de Goede <hdegoede@redhat.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Thierry Reding <thierry.reding@gmail.com>, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org Cc: Andy Shevchenko <andy@kernel.org>, Linus Walleij <linus.walleij@linaro.org> Subject: [PATCH v2 2/6] pwm: lpss: Rename MAX_PWMS --> LPSS_MAX_PWMS Date: Tue, 8 Nov 2022 16:22:22 +0200 Message-Id: <20221108142226.63161-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221108142226.63161-1-andriy.shevchenko@linux.intel.com> References: <20221108142226.63161-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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?1748938491376164977?= X-GMAIL-MSGID: =?utf-8?q?1748938491376164977?= |
Series |
pinctrl: intel: Enable PWM optional feature
|
|
Commit Message
Andy Shevchenko
Nov. 8, 2022, 2:22 p.m. UTC
The MAX_PWMS definition is already being used by PWM core. Using the same name in the certain driver confuses people and potentially can clash with it. Hence, rename it by adding LPSS prefix. Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> --- drivers/pwm/pwm-lpss.c | 2 +- drivers/pwm/pwm-lpss.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Comments
On Tue, Nov 08, 2022 at 04:22:22PM +0200, Andy Shevchenko wrote: > The MAX_PWMS definition is already being used by PWM core. > Using the same name in the certain driver confuses people > and potentially can clash with it. > > Hence, rename it by adding LPSS prefix. > > Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Thanks Uwe
diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c index accdef5dd58e..b8739cd2c235 100644 --- a/drivers/pwm/pwm-lpss.c +++ b/drivers/pwm/pwm-lpss.c @@ -252,7 +252,7 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, void __iomem *base, int i, ret; u32 ctrl; - if (WARN_ON(info->npwm > MAX_PWMS)) + if (WARN_ON(info->npwm > LPSS_MAX_PWMS)) return ERR_PTR(-ENODEV); lpwm = devm_kzalloc(dev, sizeof(*lpwm), GFP_KERNEL); diff --git a/drivers/pwm/pwm-lpss.h b/drivers/pwm/pwm-lpss.h index 8e82eb5a7e00..2c746c51b883 100644 --- a/drivers/pwm/pwm-lpss.h +++ b/drivers/pwm/pwm-lpss.h @@ -13,7 +13,7 @@ #include <linux/device.h> #include <linux/pwm.h> -#define MAX_PWMS 4 +#define LPSS_MAX_PWMS 4 struct pwm_lpss_chip { struct pwm_chip chip;