From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD7D0C001E0 for ; Wed, 2 Aug 2023 14:49:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233212AbjHBOtM (ORCPT ); Wed, 2 Aug 2023 10:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234552AbjHBOtH (ORCPT ); Wed, 2 Aug 2023 10:49:07 -0400 Received: from mgamail.intel.com (unknown [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 696AC273E for ; Wed, 2 Aug 2023 07:49:05 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="349202970" X-IronPort-AV: E=Sophos;i="6.01,249,1684825200"; d="scan'208";a="349202970" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2023 07:49:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="794595120" X-IronPort-AV: E=Sophos;i="6.01,249,1684825200"; d="scan'208";a="794595120" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga008.fm.intel.com with ESMTP; 02 Aug 2023 07:49:03 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qRD9p-003DQp-34; Wed, 02 Aug 2023 17:49:01 +0300 Date: Wed, 2 Aug 2023 17:49:01 +0300 From: Andy Shevchenko To: Zhu Wang Cc: nandor.han@ge.com, linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org Subject: Re: [PATCH -next v2] gpio: xra1403: remove redundant of_match_ptr() Message-ID: References: <20230802040232.182535-1-wangzhu9@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230802040232.182535-1-wangzhu9@huawei.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Wed, Aug 02, 2023 at 12:02:32PM +0800, Zhu Wang wrote: > The driver depends on CONFIG_OF, so it is not necessary to use > of_match_ptr() here, and __maybe_unused can also be removed. > > Even for drivers that do not depend on CONFIG_OF, it's almost always > better to leave out the of_match_ptr(), since the only thing it can > possibly do is to save a few bytes of .text if a driver can be used both > with and without it. > Since spi.h included mod_devicetable.h, so we drop mod_devicetable.h. Okay, but it's other way around, "we don't include it if it was missing". Sorry, I was probably unclear about this. Here it's fine and good that it's included explicitly, no need to drop. -- With Best Regards, Andy Shevchenko