Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp525324rdb; Fri, 6 Oct 2023 10:09:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4C98yYhz3CnZ4S7nalz7FPPTRKUE5pl4ghs5E4kb/Dj8MRsHE4uxjcbVSwR53ODLY5Teb X-Received: by 2002:a17:90a:f406:b0:273:f887:be17 with SMTP id ch6-20020a17090af40600b00273f887be17mr8904869pjb.47.1696612193427; Fri, 06 Oct 2023 10:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696612193; cv=none; d=google.com; s=arc-20160816; b=g4vKS5R9AH/sHCEECSHdEn9FVD4ALk8Dvs5+ZAVQNreG8l7C/wimEVJCqQhFW/e4ru 7beQlOSpWvXvSsPJXoUmvToD8R4wW9q6rgRGrjFzJODas7Od0m7ETyU/JN8JbrvQIWun /xNsj82jEJCci6JmGPWM3basf6JMWx39SlPNIbqpi+LSxkgwopAsJXrLcUB0mLRtGhjW nTwtMI9QuQqAN5Sl2UO6dsKRrYWim1ck+xawmP7zY/zQge2tNyswQbAQ3i3by0oPGVCf /hDW5TqSoNC6qi1uIIKyM4tB8nwEPQ/kF/JNkE1B4y9Ojab37WWGA/2p5D9PMJkFooAg 3hIg== 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=q4CHYDckQ+QF26tAup+TjibaSYNiGvtrGF0BfcPGvSM=; fh=92JjT+ns17pjF8gNjDcYT4O72MkU5mNxuw+csjOwFNk=; b=AKSw2rPnws6f824jA9FKUHNFaqJOypMY61p3M/2hPRZSImHpcXYwM0busgHtYhqick rb4QfPvRwlY2w0WW1H8fpQGFLCoKPKkKF4fBtd3oYt2DCXcxaDvHuFogvtS/VzhcnA5N 8h6Rur8VJ7CYK9CAr4K2c+F+FWouH7bLMeui1iXRarnDzJmZvBg1dMxokMC3UJrcoC6z XlRiwDhRe+QNdE5DKi8s3OlViFpfraAwCyIpALkiVH6jyR/nJvMhqTtinWSJb/dvsvc/ luoTIHo2WEBspfvbms0oWndHFGjjw0PzknbPZuySa42fCqEJpfREq3TtYsBuSgFtQ6JQ yyOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EHxdoDqU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id i14-20020a17090acf8e00b0027b0a89978csi250784pju.166.2023.10.06.10.09.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 10:09:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EHxdoDqU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 19F3D8332F90; Fri, 6 Oct 2023 10:09:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232571AbjJFRJe (ORCPT + 99 others); Fri, 6 Oct 2023 13:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232198AbjJFRJd (ORCPT ); Fri, 6 Oct 2023 13:09:33 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91697BF for ; Fri, 6 Oct 2023 10:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696612126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q4CHYDckQ+QF26tAup+TjibaSYNiGvtrGF0BfcPGvSM=; b=EHxdoDqUpRgBus/PAQl2w+jVAbhJB5yQzUGws3oMcHl6XTu/xItgyX0+Mmq5ACCE1saxdA P3ogYw2uZ2B7UT6Q/Uwir+DZBE2DfSrQezHQI/1CAKbNNpVUZJulWQvAh3jDyLdViUwe2b O6QELAmYz3Y0vt3UPVuoe6Q1JlNl2P4= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-270-SMhrMzOMPly-zdIZ7G2U2Q-1; Fri, 06 Oct 2023 13:08:39 -0400 X-MC-Unique: SMhrMzOMPly-zdIZ7G2U2Q-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-9ae42088b4bso189816666b.3 for ; Fri, 06 Oct 2023 10:08:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696612117; x=1697216917; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=q4CHYDckQ+QF26tAup+TjibaSYNiGvtrGF0BfcPGvSM=; b=GcyJcIaEyyQxm44+vMdIFOy2waW12gw2BB/knCRanfTZycVLbcO9kyDAFG0dYQ8H+5 ZlJdD7y7Y55fnyIJ9QkIkPAOtji5lkSxklrIr1DKvvsdIKd+zljarkjTmRLG6WuujjF2 dsm5qdHzef3pDcLu7SvejIUT39ZqGUsNiN6sdLHJN8nagUhrf16+EgFE2la1l/fXqovn rT1peX8/ZtAg5d70O5pbuphOsigIYNre1D3aIpPyFamsv+Zsc6cPYJ3vZCkFS6B/6Zv2 J+6/H3DJtK6HOJ8iLf45cArcfh9JOXjVlvqIqYG4T21GgLwzwVBWEDmfSpn1D2CeLtRv FIPA== X-Gm-Message-State: AOJu0Yypw2Ys36McVeDrHWb6n74vfjoemniUP5WFrZs/p836gO4Ui8i+ hLRf/Tg0tmW9pUqhrGPQ/Y1LNCP17XGeP7Mhtf8VWDOL0C/Bapk8RIcT1cOHWAT+xBAVX6aBSR6 LREAae3db3mYGPRuZwQW2+55KsirqaYCG X-Received: by 2002:a17:907:2724:b0:9ae:6196:a410 with SMTP id d4-20020a170907272400b009ae6196a410mr7690109ejl.43.1696612117521; Fri, 06 Oct 2023 10:08:37 -0700 (PDT) X-Received: by 2002:a17:907:2724:b0:9ae:6196:a410 with SMTP id d4-20020a170907272400b009ae6196a410mr7690090ejl.43.1696612117260; Fri, 06 Oct 2023 10:08:37 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id t27-20020a1709063e5b00b009a168ab6ee2sm3125674eji.164.2023.10.06.10.08.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Oct 2023 10:08:36 -0700 (PDT) Message-ID: <371fc87d-ade3-51b8-6f56-4d99dad88873@redhat.com> Date: Fri, 6 Oct 2023 19:08:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_device() Content-Language: en-US, nl To: Andy Shevchenko , acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?Q?Jo=c3=a3o_Paulo_Rechi_Vita?= , Corentin Chary , =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= , Mark Gross References: <20231006155351.3503665-1-andriy.shevchenko@linux.intel.com> From: Hans de Goede In-Reply-To: <20231006155351.3503665-1-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_SBL_CSS,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 groat.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 (groat.vger.email [0.0.0.0]); Fri, 06 Oct 2023 10:09:49 -0700 (PDT) Hi, On 10/6/23 17:53, Andy Shevchenko wrote: > Replace open coded acpi_match_device() in asus_wireless_add(). > > Signed-off-by: Andy Shevchenko > --- > v3: rewrote error path logic (Hans) > v2: fixed compilation error > drivers/platform/x86/asus-wireless.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) Thanks, patch looks good to me now: Reviewed-by: Hans de Goede Regards, Hans > > diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c > index abf01e00b799..1a571efa02eb 100644 > --- a/drivers/platform/x86/asus-wireless.c > +++ b/drivers/platform/x86/asus-wireless.c > @@ -148,16 +148,12 @@ static int asus_wireless_add(struct acpi_device *adev) > if (err) > return err; > > - for (id = device_ids; id->id[0]; id++) { > - if (!strcmp((char *) id->id, acpi_device_hid(adev))) { > - data->hswc_params = > - (const struct hswc_params *)id->driver_data; > - break; > - } > - } > - if (!data->hswc_params) > + id = acpi_match_device(device_ids, adev); > + if (!id) > return 0; > > + data->hswc_params = (const struct hswc_params *)id->driver_data; > + > data->wq = create_singlethread_workqueue("asus_wireless_workqueue"); > if (!data->wq) > return -ENOMEM;