Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1339159rdh; Mon, 25 Sep 2023 09:37:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFz3om97zwXGbvA/keZ9Ss+RP1pXjLtqBSrzjZ6GAOck+p97HB/UITvLXJ5iVOlAYHkscLY X-Received: by 2002:a05:6a00:1796:b0:68e:351b:15b9 with SMTP id s22-20020a056a00179600b0068e351b15b9mr204078pfg.4.1695659872961; Mon, 25 Sep 2023 09:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695659872; cv=none; d=google.com; s=arc-20160816; b=y5DKgjgjalH9/WmUEMZ/Gy1bjq5E7YagQ3sUAAID7k2T8wcjxZy0ht/wRgbx7XwEVB FULMMgyEnShDUF8z8b+GbLzVhDCuX477iO0IO3SDpQBOE6UQ87KuHwCmyJmhfV+8ngCw Rd8x3yarDPI+Y6VYwS2Rbaz3Bx7e9aLFfvafJXvmHWDB5LgZo9BTFwF3Vb4+8fRYTeCR 7ER6oT8wV+mSw/x9ZaUdnAdkcMpyF8ZYccTORAwpD/ZweQatYQ40yP8LPL+gI+hKqyK5 /Q1bvJt+zRsezsvcy7t18RVS5obOoHdwNt8sUpiqAvOlJcpW7cqsKvE8A6n3AtHYr6d1 Gkkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=74fNhw4olR2hGIebC6+NLRxDid/YzYUnCLDO1DvsV3E=; fh=a5saQ2wTcMjip30NJQEfEyVlrPs/ErF25N+hS1NW2jQ=; b=dBA7L9ZMhRYsL7jID/mXWBfmQGhIzXKk7H8WkVB8+ImaOQ6yRTn3urRiUjYo4rGWfC i0lyl8F787A68UpChPqQCudfAekTDwrjSq+lLjHhHEVmeO2INqhHkl4YnyzbDE/6T2Rs +YJ3eSHSH/8ORHlLWDL1Z/+KyOt6Zn09a17MtM8ew1o2FrXfpdZdaMc/5qrYMbq+Nras kicVJcem3T0xq6Qp+OcO3YMryukhm7zU7YaIquaPkWeUCvn+DkU1NJkJV/58LwgoCsI6 RYMn9VYiPw6rF9zTePqnvUsAhP5hhXK6/4kszqzevp2JYOQPsC5Op5tDAL7eCpMVItgy UWjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iFRlb5qW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id g22-20020a056a0023d600b0068e35157c26si10715376pfc.310.2023.09.25.09.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 09:37:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iFRlb5qW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 86B6780A07CB; Mon, 25 Sep 2023 00:52:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232172AbjIYHwj (ORCPT + 99 others); Mon, 25 Sep 2023 03:52:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjIYHwi (ORCPT ); Mon, 25 Sep 2023 03:52:38 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3DBED3; Mon, 25 Sep 2023 00:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695628352; x=1727164352; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=R3k1cgOSQuf5VQnqBsn2JYn/UDWAa7+Sl2h6BSrBoL8=; b=iFRlb5qWWqc7LFe75b6UP5zrA5u9lo5Ul7nQHpFUM6Xgr1IhMH5hQ7OS MP+bW+wojOnK1Yuioz3/fmDgxjx94bkPx97tBF/q5/WrZT2Lpw2piZpYP 6JnMQxyzaTVJvKa9U4IebXpSFITU394iB3lt1jmHpMy7/vtVUkw2YhaWP C0zr5qTm89bJVQPFxraqbsM8SOHsgICPrgdouFW2YFFOd1PExybm7S0eH NjZyqlN0z+OJCe+1tzXGxkNLwhcT1ewn/YoAar3K/ACDpCkgHa7ZzNWTi cCdYiVZVC7cSQDKcI/8ByXssAiwU3b95peYqozv1DXBHgbhRJJiWJnZIi g==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="412123669" X-IronPort-AV: E=Sophos;i="6.03,174,1694761200"; d="scan'208";a="412123669" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 00:52:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="697902091" X-IronPort-AV: E=Sophos;i="6.03,174,1694761200"; d="scan'208";a="697902091" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 00:52:30 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC0) (envelope-from ) id 1qkgOJ-00000000HfP-0zU6; Mon, 25 Sep 2023 10:52:27 +0300 Date: Mon, 25 Sep 2023 10:52:26 +0300 From: Andy Shevchenko To: Biju Das Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das Subject: Re: [PATCH v3 3/3] pinctrl: mcp23s08: Simplify probe()/mcp23s08_spi_regmap_init() Message-ID: References: <20230924172320.15165-1-biju.das.jz@bp.renesas.com> <20230924172320.15165-4-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230924172320.15165-4-biju.das.jz@bp.renesas.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 25 Sep 2023 00:52:48 -0700 (PDT) On Sun, Sep 24, 2023 at 06:23:20PM +0100, Biju Das wrote: > Add struct mcp23s08_info and simplify probe()/mcp23s08_spi_regmap_init() by > replacing match data 'type' with 'struct mcp23s08_info'. > > While at it, replace 'dev_err()'->'dev_err_probe()' and drop printing > 'type' in error path for i2c_get_match_data(). No need to duplicate info in the name of variables (see below). With this fixed, Reviewed-by: Andy Shevchenko ... > +static const struct mcp23s08_info mcp23s08_i2c_0008 = { static const struct mcp23s08_info mcp23008_i2c = { > + .regmap = &mcp23x08_regmap, > + .label = "mcp23008", > + .type = MCP_TYPE_008, > + .ngpio = 8, > + .reg_shift = 0, > +}; > + > +static const struct mcp23s08_info mcp23s08_i2c_0017 = { static const struct mcp23s08_info mcp23017_i2c = { > + .regmap = &mcp23x17_regmap, > + .label = "mcp23017", > + .type = MCP_TYPE_017, > + .ngpio = 16, > + .reg_shift = 1, > +}; > + > +static const struct mcp23s08_info mcp23s08_i2c_0018 = { static const struct mcp23s08_info mcp23018_i2c = { > + .regmap = &mcp23x17_regmap, > + .label = "mcp23018", > + .type = MCP_TYPE_018, > + .ngpio = 16, > + .reg_shift = 1, > +}; ... > +static const struct mcp23s08_info mcp23s08_spi_s08 = { static const struct mcp23s08_info mcp23s08_spi = { > + .regmap = &mcp23x08_regmap, > + .type = MCP_TYPE_S08, > + .ngpio = 8, > + .reg_shift = 0, > +}; > + > +static const struct mcp23s08_info mcp23s08_spi_s17 = { static const struct mcp23s08_info mcp23s17_spi = { > + .regmap = &mcp23x17_regmap, > + .type = MCP_TYPE_S17, > + .ngpio = 16, > + .reg_shift = 1, > +}; > + > +static const struct mcp23s08_info mcp23s08_spi_s18 = { static const struct mcp23s08_info mcp23s18_spi = { > + .regmap = &mcp23x17_regmap, > + .label = "mcp23s18", > + .type = MCP_TYPE_S18, > + .ngpio = 16, > + .reg_shift = 1, > +}; -- With Best Regards, Andy Shevchenko