Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp476645rdb; Fri, 6 Oct 2023 08:51:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGaHxLa4xt+hZ6BUeT9z8pkL5xQ2zAjUslMvKt24Nu2YRo2qyzguFUl8H0wYi7m9CaVE/eI X-Received: by 2002:a17:902:8e87:b0:1b2:4852:9a5f with SMTP id bg7-20020a1709028e8700b001b248529a5fmr7978684plb.54.1696607515851; Fri, 06 Oct 2023 08:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696607515; cv=none; d=google.com; s=arc-20160816; b=sFSdpO2KZD8vKwoW48IFwmTIxnIJwW60lvxUEseQ+rSxd2kfeJOF1ZcOtzqVIXJ5Qf SJvp78QI5SfbD6piiQFqUMRsiXPmVoPS6PZcDYwWMHuJe+hBLNkOQ2gSZmPgvlEuLBxI Elx1rtF8p78jOfgcwbjhCkSXsIXjxb/rL1FDuS8irRuObbHY7fxOG40n5MvBZnx50lFZ x6Fn9GGYr61i6neZZOuGkOUS0SYH6ltObu7Jve+K6Gouu9swtqA0n3U5vwDOgcEDPOYJ 8XU4njb6Uvh1zfcsNK+PzlvXNSqG1ISSCW742wOBOP8cJDjdyT6SrsI4ADsPa/LRX2kh IRGA== 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=rtLldbskH5YQ9tW8dlmnbH9huRTMmdJcKppd0788cw0=; fh=noJ2O2xUM4DPnhioo0ijFDJRT3ruo/3DPK7gjzfhITw=; b=nTQBXTQ6z8J0P03TWp8cnQPUnzTZNVxC+/OrhIpBGrD7N1beMNcdeNjJfRjT8YvpSC 1D70/UPfYG9mwAXs1rXfJ9245IAjwipXR7xOuiHMuhJ8JUH8BmHiFR4kQZlI/z0/hmYi G/AihOjelVQbVNe7ZbT09uG224glaQo65Z6sC4f3VfoRyDC1rtlNZtahJIIiqFDYHf6f v2DJcv26K+8OX3O2eN0Log/ksoLkjzIF7dg1XUw/6Ye5HHgI1YDo62yra+DCvjGLKeuX HbwU9poE257d3guPfe592ZAgnuJIyQKXsCM8zCbcTrZjcPp/TEKpZjx4Ku3FLs0OPVNV SlZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MJmHxbfE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id ja1-20020a170902efc100b001c7615a8de5si3754331plb.20.2023.10.06.08.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 08:51:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MJmHxbfE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id F17958082058; Fri, 6 Oct 2023 08:51:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232887AbjJFPvM (ORCPT + 99 others); Fri, 6 Oct 2023 11:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232446AbjJFPvL (ORCPT ); Fri, 6 Oct 2023 11:51:11 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 134D39E; Fri, 6 Oct 2023 08:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696607469; x=1728143469; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=wM6CohiPQIIRlPPtGEd1udq/67O5yRJd469Kn4iE5wg=; b=MJmHxbfE30Be+nZPYeEjvcbQ6IkhcSZrSTpJAnvJV4AZ5s57a4NfJsSS wySsdOw5nWxKyjfoRGvdF6ubrrlMqlCnHAOBf1pFsnMQQRd4C/zKREMEP dQSNMBiV2sSkH66ODOHVUbamxm8vFvpGkQtyhWeycWRhEVJ4BkelPnxr7 nQrUEX/h0l0X9fU2RshAa7HZkE2Pq8cdXlBKjxlzztRRVmGKuNpx8RfLr 9JxG1OEdHJXFTWP+KCAUBE8nnqRvfYsOV72KFokxNM5Y1Cb35zHcLf4Yd zRulC4Bzoa8sSmOOtJtuc55xaHD0NZnuk+VG4q7qr9fEmSj/WfI5hthM4 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="374119405" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="374119405" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 08:51:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="868384851" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="868384851" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 08:51:06 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC1) (envelope-from ) id 1qon6V-00000003MWk-1Iik; Fri, 06 Oct 2023 18:51:03 +0300 Date: Fri, 6 Oct 2023 18:51:02 +0300 From: Andy Shevchenko To: Hans de Goede Cc: acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Chary , =?iso-8859-1?Q?Jo=E3o?= Paulo Rechi Vita , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Mark Gross Subject: Re: [PATCH v2 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_device() Message-ID: References: <20231006152739.3495671-1-andriy.shevchenko@linux.intel.com> <9ebb5ae0-2ec0-198c-3843-e44ce84493d2@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ebb5ae0-2ec0-198c-3843-e44ce84493d2@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=2.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Fri, 06 Oct 2023 08:51:33 -0700 (PDT) X-Spam-Level: ** On Fri, Oct 06, 2023 at 05:32:10PM +0200, Hans de Goede wrote: > On 10/6/23 17:27, Andy Shevchenko wrote: > > + id = acpi_match_device(device_ids, adev); > > + if (id) > > + data->hswc_params = (const struct hswc_params *)id->driver_data; > > if (!data->hswc_params) > > return 0; > > Thanks, but the error checking looks a bit weird now. How about: > > id = acpi_match_device(device_ids, adev); > if (!id) > return 0; > > data->hswc_params = (const struct hswc_params *)id->driver_data; > > That seems to better convey what the code's intention is. Indeed, otherwise the hswc_params seems to stay NULL anyway (due to kzalloc() use). I'll send a v3 with your suggestion being incorporated, thank you! -- With Best Regards, Andy Shevchenko