Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3377617ybf; Tue, 3 Mar 2020 05:01:25 -0800 (PST) X-Google-Smtp-Source: ADFU+vs1k817WZewwqtRar4IT6y/u3vmWDu24M1oNYCyoMpiFiVEnufMkHsa057+ktZyu8RTPgDa X-Received: by 2002:aca:56c5:: with SMTP id k188mr686353oib.165.1583240484564; Tue, 03 Mar 2020 05:01:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583240484; cv=none; d=google.com; s=arc-20160816; b=SeP5vGYuRasYhPoaegdTOeVwVoewJLAi6JsVcQLMGQMLvqlXqpRZMqJcc7/M5+rCh4 /9WxiDRIpj/b5xNVs++y4YTOryNlFuD1BkxSbUH9XtBokYvVNwkTfGAhKYka7yxci/Sp q7BRX44imqyYdivcxxajNLUkG+AosjWJRPIRF+w0FKkhqI3+PHeTXKMdBMykqhTSrqPU dcoKOiLOW+VRC4EmzI+jfTVeQ7GZhxunGcXRvZDu0pRaLApqkM+xcbX1IUjLLuXl3lyR aY0cQLlMYmh2igDKQkBVaZFK4wKDEcRukSBk0+9+Wx/ntJ45fVI1ulZpXqa2Gy7AJOjk 3JuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Cd3PuDX7QGlpsLRHSkLqaNlrKLigo/VJS+jTQKxKQ4I=; b=whLD44xjrOU6O8pSR9/ubism0XaCnYZJWfpxZCaWwYDcm/lcjG6FM1q6oS1GhVQrZy urmXRaehPKMOO4pLhSP3jX4k4t3f0+Z/6uJhsss2v1oqFOiN6bZpFTO1Khdz9fHDSihV 1vCK6023SHxOHxeJTE3+XyKWDrXL79KRU4Zw6PQRLEoI4q4V0RujErp9hJDnZLCmTg6H ENeAf+EpUaywvlByq0ISbAKiD38wKVOIH0L2T8kwjOjGi/1Ztzee15b5bS8b9/+49FzE iWZnF/Hmh6wXqYXXJ8Bok2fjVkrsbSEw1WOLSRQKSI6176HgANIEFlmNTZARrUw+DfzZ 3WoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y9nHQ8bh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m25si8718322otn.208.2020.03.03.05.01.03; Tue, 03 Mar 2020 05:01:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y9nHQ8bh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729304AbgCCMel (ORCPT + 99 others); Tue, 3 Mar 2020 07:34:41 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42320 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727121AbgCCMek (ORCPT ); Tue, 3 Mar 2020 07:34:40 -0500 Received: by mail-lj1-f194.google.com with SMTP id q19so2396328ljp.9 for ; Tue, 03 Mar 2020 04:34:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Cd3PuDX7QGlpsLRHSkLqaNlrKLigo/VJS+jTQKxKQ4I=; b=Y9nHQ8bhBUHFsRGta95iKneEmmxYzcq36hN1eDHokC2iEnSBusLXp4oraHu4nZ44a1 PDUL0NPlkSj9R2KiOB/guYeQHSCwsWMKMFUpofbpDnmeIuhCK2v4ZgKWv3wWeT0vU743 Dym6dRgKsaosD8pNyCJhPyass3LMEOwPWFpoPjQuObMWqL9DenwMCAhhjzvmO/AsHhyX fw0zseDzmakF6WleQx56XgB1IR235elHrHqkZWg1JsKGZBFaC7R8p11d3N2ZRXjN48ae XtEr+3+tJuqIi3eXzd+pbWklChykz3YNF3fvLsk2K1+i4krGaczU7gfWhng4hbt5ZLKJ CtZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Cd3PuDX7QGlpsLRHSkLqaNlrKLigo/VJS+jTQKxKQ4I=; b=mTHM0PSoUWRXUZqd1h6ResQYsjKWPSzMDrdhfMX4ewitu6RjDvDJyhdwy8XbbJTz6/ +71QcHJIP1addnrjIo3hQlko+Tu3Fe8bV14bLFbSm0gymD0PrX3B6TY7Q8CYLXemAJWu j4nwX4F2f1ygbuoq5yT5aGtSQogs8QdUEmWKhskJtJr6RmknAAnfkutLhtNAjmYLA97t ld0rnMwKZFeh0RoEVcSmDLlYHCCr4u7NIp6FB9h3PpvfnnHb6xp6N+Y+HlaTn8Tfwvaq yMrjUd4TFxi8ZNVQ3g7hkLArcJ23qxrRpz5JYzfaiZn2pqgga2l150WkAACLlDjHZtoe AuMA== X-Gm-Message-State: ANhLgQ2jxFs0GvKSxWbv13hZYbliPTSTF1pn7TAdEwVmD3YVa7Yvqe4I LHGwVXB1jz6zjsXLQDn3fDt9TeNtwTwm2gl5Xek9J61S X-Received: by 2002:a2e:9c8a:: with SMTP id x10mr2417162lji.277.1583238876321; Tue, 03 Mar 2020 04:34:36 -0800 (PST) MIME-Version: 1.0 References: <20200302082448.11795-1-geert+renesas@glider.be> In-Reply-To: <20200302082448.11795-1-geert+renesas@glider.be> From: Linus Walleij Date: Tue, 3 Mar 2020 13:34:24 +0100 Message-ID: Subject: Re: [PATCH] gpiolib: Fix inverted check in gpiochip_remove() To: Geert Uytterhoeven Cc: Bartosz Golaszewski , Andy Shevchenko , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 2, 2020 at 9:24 AM Geert Uytterhoeven wrote: > The optimization to check for requested lines actually optimized for the > uncomon error case, where one of the GPIO lines is still in use. > Hence the error message must be printed when the loop is terminated > early, not when it went through all available GPIO lines. > > Fixes: 869233f81337bfb3 ("gpiolib: Optimize gpiochip_remove() when check for requested line") > Signed-off-by: Geert Uytterhoeven Patch applied with Andy's ACK. Yours, Linus Walleij