Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2919512pxb; Mon, 18 Oct 2021 04:49:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEa6iIQOI2D6YbkmZh+9hwoOjQjfNY+and7w4GwR3FoBIM7cVXmJOnqI3+NyXjgaSAvF9F X-Received: by 2002:aa7:cd53:: with SMTP id v19mr24478476edw.8.1634557787236; Mon, 18 Oct 2021 04:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634557787; cv=none; d=google.com; s=arc-20160816; b=nvps5dWDlWmaAlcqlKjjSDZG7G1Za4fRDQwfBhoE4Hl8O1BfcnN2pf4tg7BJqW2iQT zMorD9rFlj/tDGoIc/lZuo0e9RffPQhZfcL/EiF0zhmKr9K+aHRp+X7hHBztKGWNWDHM xc8pGS3GIoZdklg5Ong09AtZ/J51i6n8uteTILBB3W51h5L8C/J/Cmrek45y2vVjCQz5 GYWv5v8UdzeHNPjUnU996qLX7GmSPZj1Uve5uGESA7VVCbJo3tz+lNcnt3lUVEVxd/Mc 13VZ1UpWD8SotwaRfxUEagIZHIb0oPiccuA6nE16AyCU96XAHKYTdjxmVgz15wJnjY5q hTcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=41YRmB8CyGiXEaoxvPxP09LoXDT5L6K5fs5InVZb2qU=; b=sCwQAt2U6IzltqCjDBcJM3wr8Gt5dU6VXcLEkgF4dav45GSujiPr7cNa/+tp1zNW/R NxkRHl94T9Lrhh+8WCKNnzYdJtU7BOOqLVAHosoIqm5v42nVtt3Q3muSU6cR+zvwRzJ0 Qr9xbouIhEkUUra9uzHXZz7ohIYAOTRdvZPaV1p5JgewmecJnWzCbGa4ANJmglZ3uWNv 8NlQ4j0kHIe0W+NbHCvDfdzjaS6NuyRi8XncYScwxK4WuxqB84KT5IdhapQYQUfHVkcQ Z+/1sDLHw6SsEhYhVu6YW7zCQAkyviekWg51Gk6NijUMzQgq6UGMaidBwkoA9fM+3VMi FNjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb36si5376079ejc.315.2021.10.18.04.49.22; Mon, 18 Oct 2021 04:49:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231493AbhJRLta (ORCPT + 99 others); Mon, 18 Oct 2021 07:49:30 -0400 Received: from mail-vk1-f171.google.com ([209.85.221.171]:39899 "EHLO mail-vk1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231167AbhJRLt3 (ORCPT ); Mon, 18 Oct 2021 07:49:29 -0400 Received: by mail-vk1-f171.google.com with SMTP id m199so8424689vka.6; Mon, 18 Oct 2021 04:47:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=41YRmB8CyGiXEaoxvPxP09LoXDT5L6K5fs5InVZb2qU=; b=XsGkoxlmSHLwFYZJo9VU1fjYRlyet/3xi8lSQtC3n8eju67gvoZuxebLvcZjHCXBoj ufip/IID23FwxrX6PdN6fFK4gqTzJ1ct+xAQ8Tu+Vq0X1ivftIMBCwNPcGy5jbEQ5T+q Rhja/FWN/AcypEXSFH45wQP29lGWfCCLW0ZCtiKcpgMjYJwVoZIrtR9tt2H5nx4EiDOo p2Sgo+hsla5odNhW4I3M6V9UcmLa8nDmARVqJiOTxEk3Hrjl4T27nz2sQFxcCXzoMw7G JWyyjlgBS9SI+G6SOtOsMmq41Lu1USJF/odnhRO/vNvyQ6IY4x7nd+5HF5MqcbQaZ4Xa FeSQ== X-Gm-Message-State: AOAM531ysDB/ySyuxLNm8LU5U+E1Hkmm0pDHtjTyyGSTUrRkloKdqCQx Djfh3NV0mfjgFvNrmiPt1XDFE4HcWRZbaA== X-Received: by 2002:a1f:9d09:: with SMTP id g9mr23884849vke.4.1634557638286; Mon, 18 Oct 2021 04:47:18 -0700 (PDT) Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com. [209.85.221.172]) by smtp.gmail.com with ESMTPSA id v3sm8754913vkv.19.2021.10.18.04.47.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Oct 2021 04:47:17 -0700 (PDT) Received: by mail-vk1-f172.google.com with SMTP id 34so8396071vkl.13; Mon, 18 Oct 2021 04:47:17 -0700 (PDT) X-Received: by 2002:a05:6122:d05:: with SMTP id az5mr7503109vkb.19.1634557637704; Mon, 18 Oct 2021 04:47:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Mon, 18 Oct 2021 13:47:06 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Input: gpio-keys - print button label in IRQ button error messages To: Dmitry Torokhov Cc: linux-input , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On Sat, Oct 16, 2021 at 7:34 AM Dmitry Torokhov wrote: > On Fri, Sep 24, 2021 at 09:18:02AM +0200, Geert Uytterhoeven wrote: > > When an error message related to IRQ buttons is printed, no clue is > > given about the actual button that caused the failure. Fix this by > > including the button label, to make it more obvious which button has an > > incomplete or incorrect hardware description. > > > > Signed-off-by: Geert Uytterhoeven > > --- > > drivers/input/keyboard/gpio_keys.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c > > index 0f2250c6aa4978d5..fc706918d7b103cb 100644 > > --- a/drivers/input/keyboard/gpio_keys.c > > +++ b/drivers/input/keyboard/gpio_keys.c > > @@ -617,14 +617,16 @@ static int gpio_keys_setup_key(struct platform_device *pdev, > > } > > } else { > > if (!button->irq) { > > - dev_err(dev, "Found button without gpio or irq\n"); > > + dev_err(dev, "Found button %s without gpio or irq\n", > > + desc); > > I do not believe description is mandatory, so we may end up printing > "gpio_keys" here. I wonder if it would not be more reliable to print the > index of the problematic key? The description (label) is indeed not mandatory, so without that it is as good as before ;-) For the index, I'm wondering if the iteration order is unambiguous, and cannot change? So perhaps we want to print both ("button %u (%s)")? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds