Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1121242rwb; Fri, 28 Jul 2023 05:14:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlHS+DgsLnq6hohew1YI9ikZARiZROrBzipbcU91W9Xe6QFSXCf1OkekxaeDoU71BNSo0joE X-Received: by 2002:a05:6a20:840a:b0:133:be9d:a8d3 with SMTP id c10-20020a056a20840a00b00133be9da8d3mr1607036pzd.14.1690546448088; Fri, 28 Jul 2023 05:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690546448; cv=none; d=google.com; s=arc-20160816; b=kS+le/594eQiolX6EkTveElfLh90bcJNS0MwJgTXJzlnaIAO6Ovg6keksjHHRShx8m 1BmGU/5m/bVrsIqnwF7cv2HX5EQxhpoOA3DVbtRTQE4NhRMYUpG+zvr4tCVTpT/vfw7D iSTyIgQyvIQq4NigPih+HsVvlE0/pEw2+yAlGhXd6qn271TC3GMDqQoYfVazaATKYdY6 LjW8N1FXfdztjvZJ3wRqVVVcuPACarwIVrouGOZJBmiyV7WMFxhmETOzHSApqIaEnTld 3zw3yO04RtcvPrWYGbEymEpvfMGHuyLQBMcoFKbhKS3YgjOCPTxsed52RxyN85QSLRzU XnVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=1OiZv6g+dTbuDj5mJPdJuYvdumOUrVLQsFi4F1EOpmE=; fh=ZEulQzggoWqXpOeomhCw7C1aylwIcLgweckWBY04Jb8=; b=l5xm881HDGRGmVZOI0BVWnMldeZerX/3Q5FY4r3s6l/artkKivlpCejMYdsg1LPh6x BQB92yc4gq2qUfH5gB8kj1i0PVRFDCW2ivdORhWu7FJ8bogCrWTqqDgkCLf/V+8oAsc9 5nTUxZ+QNzM2NbskfEaRddbg/R4atuF0rjtKPJXm9o7rmvxtiXd6eo+gkTtjWpArPTP2 wJTqqWEUlbLXO5xZFvUgbc+GTB4CA4hdni0iCKgxXQofAabV0LzJby5JBiopxNwLbmoh qoEj6ouG7EdUPvpRJ3UDW7W57Dtnu+CPgg5YPKPxXUYO9U6bi8sn/a+hMIsr3C/XNO4t VKwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nyAAkG35; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a170902ce8c00b001b8ae12560fsi3087681plg.610.2023.07.28.05.13.55; Fri, 28 Jul 2023 05:14:08 -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=nyAAkG35; 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 S236262AbjG1LdT (ORCPT + 99 others); Fri, 28 Jul 2023 07:33:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236264AbjG1LdP (ORCPT ); Fri, 28 Jul 2023 07:33:15 -0400 Received: from mgamail.intel.com (unknown [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E4223C07; Fri, 28 Jul 2023 04:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690543991; x=1722079991; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=uAiSCACue2/Yc7IB3UDBv81ePECoMUEDVW8spdeHU98=; b=nyAAkG35HlI3xc5RHUAJTEW1fG/Uyl2T6QOthhWz95yMz1k27CTJo6UB x74tuXTJNo224SJAEjx/pAwmUFxOuhytAkxWqdeHvD3VI481IyL56z65R mUCoBIm2hrlhdz/Du6VWuPsk+hzCGoTy82FaHC+B24gHtVw44BkrM1gBP rR/+gGv4ahZ7KrJKgrm5Xc70SAfS+G+fi9x0fQ1qkg8RAtpOJdHglgUrb BPzTw/G8pl9sdMrG5/Rvn9iiv1k1uapetgUoGNcj4hnh/WiEvkRtkfxiz KLouyi1Q2OQdP9seSeBadyjKIGuwVh6CkMuvhY1dhP6H0sYcPckpG2tNZ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10784"; a="366031009" X-IronPort-AV: E=Sophos;i="6.01,237,1684825200"; d="scan'208";a="366031009" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2023 04:33:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10784"; a="851177485" X-IronPort-AV: E=Sophos;i="6.01,237,1684825200"; d="scan'208";a="851177485" Received: from mylly.fi.intel.com (HELO [10.237.72.59]) ([10.237.72.59]) by orsmga004.jf.intel.com with ESMTP; 28 Jul 2023 04:33:07 -0700 Message-ID: <928d54c4-ec71-5f09-ed66-5f9c52aca6ba@linux.intel.com> Date: Fri, 28 Jul 2023 14:33:07 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.13.0 Subject: Re: [PATCH v1 1/9] i2c: designware: Move has_acpi_companion() to common code Content-Language: en-US To: Andi Shyti , Andy Shevchenko Cc: Mario Limonciello , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Mika Westerberg , Jan Dabros References: <20230725143023.86325-1-andriy.shevchenko@linux.intel.com> <20230725143023.86325-2-andriy.shevchenko@linux.intel.com> <20230725214521.zxjqinryvva2zanx@intel.intel> From: Jarkko Nikula In-Reply-To: <20230725214521.zxjqinryvva2zanx@intel.intel> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,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 On 7/26/23 00:45, Andi Shyti wrote: > Hi Andy, > > On Tue, Jul 25, 2023 at 05:30:15PM +0300, Andy Shevchenko wrote: >> Instead of checking in callers, move the call to the callee. >> >> Signed-off-by: Andy Shevchenko >> --- >> drivers/i2c/busses/i2c-designware-common.c | 11 +++++++++-- >> drivers/i2c/busses/i2c-designware-pcidrv.c | 3 +-- >> drivers/i2c/busses/i2c-designware-platdrv.c | 3 +-- >> 3 files changed, 11 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c >> index cdd8c67d9129..683f7a9beb46 100644 >> --- a/drivers/i2c/busses/i2c-designware-common.c >> +++ b/drivers/i2c/busses/i2c-designware-common.c >> @@ -255,9 +255,8 @@ static void i2c_dw_acpi_params(struct device *device, char method[], >> kfree(buf.pointer); >> } >> >> -int i2c_dw_acpi_configure(struct device *device) >> +static void i2c_dw_acpi_do_configure(struct dw_i2c_dev *dev, struct device *device) Because of this dual dev pointer obscurity which is cleaned in the next patch and Andi's comment below in my opinion it makes sense to combine patches 1 and 2. >> { >> - struct dw_i2c_dev *dev = dev_get_drvdata(device); >> struct i2c_timings *t = &dev->timings; >> u32 ss_ht = 0, fp_ht = 0, hs_ht = 0, fs_ht = 0; >> >> @@ -285,6 +284,14 @@ int i2c_dw_acpi_configure(struct device *device) >> dev->sda_hold_time = fs_ht; >> break; >> } >> +} >> + >> +int i2c_dw_acpi_configure(struct device *device) > > I was about to ask you why are we keeping this int, but then I > saw that you are making it void in the next patch :) >