Message ID | 20231110182304.3894319-14-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1321492vqs; Fri, 10 Nov 2023 11:03:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqEyfiV7ZQITR1kqbk2ECe3p/fNIaStp5CjJWhY9D73QEhu6REv/V5CIzOz5j9jb5vwmbH X-Received: by 2002:a05:6a00:1a8e:b0:6c3:720a:157a with SMTP id e14-20020a056a001a8e00b006c3720a157amr9963061pfv.12.1699643025466; Fri, 10 Nov 2023 11:03:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699643025; cv=none; d=google.com; s=arc-20160816; b=AddZ53NqT7jRLynPyeNbZXJ+JS7v3yIr15jWrvaTMNz70EBuFmOvbd2hLdLwyH5lkc 0qgUwPfScRf7b3SZj+MSiaZPsMTwGJblb3ca8rJEjlzs04PfG+SgS6XBIaG+660FokAv pq/+4aJ3TrSFcBIX54TSe/mkOFqYUrbMEVepeNEB9XL4f6V/e/l/wnRNUYoa+ehnzn8z dKbZlOc2HPLE0p3CPSfnHx+MutYn9gdUQcCgLknv9xRhH5fUNJuskgvKiBpVhsl+hyi6 6MZs3blAIYCVIWRjuPW4OXkhM8rCukNUpMt/kRDGJyIHGOaWyLzpC6fzRCwFgU4kwRpU m2bQ== 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=L/FoU64zMTx8QeUhwzdNi+KodQ9OAuEt4sntM4hork4=; fh=oqZDtrV02dtzkTHSBiwo+TWR13WhTCI6t34Q5J0VV5o=; b=IRihGDgbCOyQotsz1bf+WmXu2Q14vIN3cQizU3a4qRUsQ9JbOc6uHifv+aQW1eKBAV ZubH+qaIl45f1jOyNm3XTDFlMfPQMH+jhyG7U2B3ALVrRgahstRfZdLX4Wsu0nKYcG7I tnvYP3xJyBBsLIcBrZU6AMMQ9iaT/LIl5DBmZHBbQGD4Z3xDFbQo9zeVut5yB5NtA8ER fdGqDOJ16fqsacPSDfynbLTjqJc6S+0rgK50TlLoiEziPT8ylKFgAYA7dfd04m7MD0K5 BouQsqcyE2n8wu+cFdeG0p96AfVGdiUU8D1ZbWzuJUwfDIFnP9HtebyzBSgU+Vs21nuM 7UUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CiyTNEro; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q20-20020a056a00085400b006b864485166si53437pfk.146.2023.11.10.11.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 11:03:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CiyTNEro; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E622A812046D; Fri, 10 Nov 2023 11:03:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236006AbjKJTDK (ORCPT <rfc822;heyuhang3455@gmail.com> + 29 others); Fri, 10 Nov 2023 14:03:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235858AbjKJTC4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Nov 2023 14:02:56 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57E1FB194; Fri, 10 Nov 2023 10:25:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699640750; x=1731176750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iBLY1R6cjuJHda+oTNWabsUonf0bQ9GTFI1KsT6FZTI=; b=CiyTNEro8OpO2/NT0idhhoKTbAmVBB9IrKGve/Ml/+nFBhVApuh76Yy1 oarS/H6n+qJNKRoOrFelj5zwhiPGq27SeW/6/ciNWz6YIeljTct3rpYK1 qr4XByuZyYqDjh9mdB4umPe1W+1JAS87mvI/hHFw/5s1uwsT3R3M8ZUPb X+6D3HRlfdWA14+gkJk+LOfpFtkWItctU6SVDKAc6QEdy1wf69npVIBi1 yz9kRsdgcSDIbEKXkZcyCbICuJoNlSe/wKouSwqEuVmtpaH/5AjOmrhl/ b0QHeWW2kC5GsVC+6kSyOoUQuGOT3Y52duN+K9lHkQqXTbhtHNk7iIutv Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10890"; a="375251957" X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="375251957" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 10:23:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10890"; a="798663752" X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="798663752" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 10 Nov 2023 10:23:16 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id E967685E; Fri, 10 Nov 2023 20:23:07 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Jarkko Nikula <jarkko.nikula@linux.intel.com>, Mario Limonciello <mario.limonciello@amd.com>, Herbert Xu <herbert@gondor.apana.org.au>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Wolfram Sang <wsa@kernel.org>, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg <mika.westerberg@linux.intel.com>, Jan Dabros <jsd@semihalf.com>, Andi Shyti <andi.shyti@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Hans de Goede <hdegoede@redhat.com> Subject: [PATCH v3 13/25] i2c: designware: Drop return value from dw_i2c_of_configure() Date: Fri, 10 Nov 2023 20:11:33 +0200 Message-ID: <20231110182304.3894319-14-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231110182304.3894319-1-andriy.shevchenko@linux.intel.com> References: <20231110182304.3894319-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 10 Nov 2023 11:03:28 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782204885085619209 X-GMAIL-MSGID: 1782204885085619209 |
Series |
i2c: designware: code consolidation & cleanups
|
|
Commit Message
Andy Shevchenko
Nov. 10, 2023, 6:11 p.m. UTC
dw_i2c_of_configure() is called without checking of the returned value, hence just drop it by converting to void. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/i2c/busses/i2c-designware-platdrv.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
Comments
On 11/10/2023 12:11, Andy Shevchenko wrote: > dw_i2c_of_configure() is called without checking of the returned > value, hence just drop it by converting to void. > > Reviewed-by: Andi Shyti <andi.shyti@kernel.org> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> > --- > drivers/i2c/busses/i2c-designware-platdrv.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c > index 15f19ec20b33..7449f1b37ecf 100644 > --- a/drivers/i2c/busses/i2c-designware-platdrv.c > +++ b/drivers/i2c/busses/i2c-designware-platdrv.c > @@ -110,7 +110,7 @@ static int mscc_twi_set_sda_hold_time(struct dw_i2c_dev *dev) > return 0; > } > > -static int dw_i2c_of_configure(struct platform_device *pdev) > +static void dw_i2c_of_configure(struct platform_device *pdev) > { > struct dw_i2c_dev *dev = platform_get_drvdata(pdev); > > @@ -123,8 +123,6 @@ static int dw_i2c_of_configure(struct platform_device *pdev) > default: > break; > } > - > - return 0; > } > #else > static int bt1_i2c_request_regs(struct dw_i2c_dev *dev) > @@ -132,9 +130,8 @@ static int bt1_i2c_request_regs(struct dw_i2c_dev *dev) > return -ENODEV; > } > > -static inline int dw_i2c_of_configure(struct platform_device *pdev) > +static inline void dw_i2c_of_configure(struct platform_device *pdev) > { > - return -ENODEV; > } > #endif >
On 11/10/23 21:41, Mario Limonciello wrote: > On 11/10/2023 12:11, Andy Shevchenko wrote: >> dw_i2c_of_configure() is called without checking of the returned >> value, hence just drop it by converting to void. >> >> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> >> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> >> --- >> drivers/i2c/busses/i2c-designware-platdrv.c | 7 ++----- >> 1 file changed, 2 insertions(+), 5 deletions(-) >> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 15f19ec20b33..7449f1b37ecf 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -110,7 +110,7 @@ static int mscc_twi_set_sda_hold_time(struct dw_i2c_dev *dev) return 0; } -static int dw_i2c_of_configure(struct platform_device *pdev) +static void dw_i2c_of_configure(struct platform_device *pdev) { struct dw_i2c_dev *dev = platform_get_drvdata(pdev); @@ -123,8 +123,6 @@ static int dw_i2c_of_configure(struct platform_device *pdev) default: break; } - - return 0; } #else static int bt1_i2c_request_regs(struct dw_i2c_dev *dev) @@ -132,9 +130,8 @@ static int bt1_i2c_request_regs(struct dw_i2c_dev *dev) return -ENODEV; } -static inline int dw_i2c_of_configure(struct platform_device *pdev) +static inline void dw_i2c_of_configure(struct platform_device *pdev) { - return -ENODEV; } #endif