Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1934857lqo; Mon, 13 May 2024 03:01:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVSIxsC76BV9xxYXChjUa7SxkZee9M5TmmRH1IHSm+iBglvrvOlluTHUa4r2xJC+69dSqzVaso2VRAv8NZu98SK+VIs9B/RWZxO1DbNPA== X-Google-Smtp-Source: AGHT+IEFz/fiEGXBw3nCqqlFhJ3WzZamTuZqYw0diGi3vCSaal4Y03ju5QKcMzkFXW5KrupOXjIv X-Received: by 2002:a54:468d:0:b0:3c8:2b1f:5270 with SMTP id 5614622812f47-3c9970491eemr9719518b6e.20.1715594500000; Mon, 13 May 2024 03:01:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715594499; cv=pass; d=google.com; s=arc-20160816; b=XqeASupA77/87GcmynT3qLlIbEb2sDURh8JrpIlJlZfZGiKT6ny0rLNmLxsMlZ+l83 lpTdk26bsyw0pBui1zCfEYzWQj0SqAPk4X2AsD9jDrO5aRSLcO5jmz8PSDVEfy3AgOmv htvpwlacHSETyZLIrlsW1tHwvlm3N/OidQntq3wt0+K1N7Cf4StLDG9OZnjvZ5DkQ5yn 9G2uXuo72V4klNVQV1hqr43/urV82LmZJ2R5eXdOvhqkXicmoo4zB8WfRgzU/6Zebufd tGUF0gvTaWxVbXZGEOq0pxJxaEwQnUm0mjlYIujpm/n7xS6NP1ZnETOBFizcYdRek96s IRLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=zEWtCnQmu4TrOIBFd7vZU5dvktYuvv3G88y2LCFHumk=; fh=+PvsQhA0qTraLGQ2/HOlmJD6ZRGuuLHa1fXJvL2Dnss=; b=AKlPvEOWhAYJGjgi2ERLDTKoO49bAWkoCuXih434lz48USXNAqctqnmZLCPWIe8rKW B0EB+StL2u/56jaxh9wvNIFGN9+dePpOqwe1kPxk7mjCr/O5w4LsTkqvjNgzSF8AXLVX vBpQ1t58Maf6ST5vSLk3bsqXNDZaT3VrQFWyOIscnt4H3vQNr575uEDNk0Ai3aNwmk9L ky1hDEFM/OGEu3eFbSbDisobGaAXnxETPa0UnJgkAysG5qQG9ma8Ed3aN+M+4664ncxt CInBZRBzY1j4+EfUaJQY7j0tZH8cqfKXySNG6g+3sxjnbeJwR6l3xhmTxE7uMFTbAV5R kbaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="al/YreVq"; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-177433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2f24f2si91406686d6.514.2024.05.13.03.01.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 03:01:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="al/YreVq"; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-177433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B24BD1C21175 for ; Mon, 13 May 2024 10:01:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F41961494C6; Mon, 13 May 2024 10:01:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="al/YreVq" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEFDE148855; Mon, 13 May 2024 10:01:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715594491; cv=none; b=T1wnINZoTq574qs+H4nWSRCfNkptd6/Hg3qb8b1hFVJbvrYtzz6yU0UeLQo5MZTzVI6hAKWfalA5u0VaxIN2MykQBKU6cLIZIoeQ6/ZbsvWPvRCWfKrC9laZvfq6Q+hIHa8d/dq9dKBrBWCeX+MUbc3DTWHSjaOVru0mFjOyt5c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715594491; c=relaxed/simple; bh=vzJEz9QnIFNvbREi3UlmbyFZkWZ7ZUfLk222orIBBYY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=W9OPqXqwDt75pWkw1iBaho8q+232DDEnqsgZSvcZbtU++NqTdwI/2KYMWK7AzX74M7I2x5XzupHSN/VwUTvfvvn+w77glWsZ0APjkhw2/Nvd77kZqQV6lYH60WPnqyxLsz+GPEY37siJzZvejXBSLao0kPZ1D+TjBKeDUeLhgG8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=al/YreVq; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1715594487; bh=vzJEz9QnIFNvbREi3UlmbyFZkWZ7ZUfLk222orIBBYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=al/YreVqDRNZD3wWAeeX39E9rAcYIz1hA0MCD1SPENOfDVj1lSLi65BItwZaqNLgH /fwqBEqHhLtHfNKH0tMlsnUSqBVHqUFORw1vp+PCe2ZLXsIET2B/SPqj67KDBHXPXE WSvwae10CepalW4LRzCjMpejfho0vm9gVUmKWY6jKHGihf7C62YBb63InJnwLIG3Vg HJ/XjSSD0pGgShaLWZ3k5Zh84QH31YZUrAr6pu5IFsWGmz0m9xvPMxR/qq5cF3rea8 AwFG6eaOgjBlFdOL4CMAVjxoeSdYKeaNxPs3IpYP9y5SmlQpNwN14gzul9gEjzjicy fGi5rLY4reBaw== Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: laura.nao) by madrid.collaboradmins.com (Postfix) with ESMTPSA id EA0D73782121; Mon, 13 May 2024 10:01:26 +0000 (UTC) From: Laura Nao To: andriy.shevchenko@linux.intel.com Cc: bot@kernelci.org, brgl@bgdev.pl, kernel@collabora.com, laura.nao@collabora.com, linus.walleij@linaro.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, mika.westerberg@linux.intel.com Subject: Re: [PATCH] gpiolib: acpi: Add ACPI device NULL check to Date: Mon, 13 May 2024 12:02:00 +0200 Message-Id: <20240513100200.218261-1-laura.nao@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Andy, On 5/10/24 16:46, Andy Shevchenko wrote: > > Now we may remove that check from __acpi_find_gpio(): > > --- a/drivers/gpio/gpiolib-acpi.c > +++ b/drivers/gpio/gpiolib-acpi.c > @@ -988,10 +988,10 @@ __acpi_find_gpio(struct fwnode_handle *fwnode, > const char *con_id, unsigned int > } > > /* Then from plain _CRS GPIOs */ > - if (!adev || !can_fallback) > - return ERR_PTR(-ENOENT); > + if (can_fallback) > + return acpi_get_gpiod_by_index(adev, NULL, idx, info); > > - return acpi_get_gpiod_by_index(adev, NULL, idx, info); > + return ERR_PTR(-ENOENT); > } > > struct gpio_desc *acpi_find_gpio(struct fwnode_handle *fwnode, > > > As a side effect it will make the comment better to understand. > > With above suggestion applied, feel free to add mine > Reviewed-by: Andy Shevchenko > > You might need to rephrase the commit message to say that > > "We also move the check in additional to the moving the function > call > outside of __acpi_find_gpio()." > > or something similar, up to you. > Thanks for the feedback, I sent another patch with the suggestions above applied: https://lore.kernel.org/all/20240513095610.216668-1-laura.nao@collabora.com/T/#u Best regards, Laura Nao