Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4053109rwb; Tue, 20 Sep 2022 08:12:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jzye4N24D2Y91i2FmI853OiJIPMz0w0VTH9IBqkbGTg/ugvXsWiT12MYULoe8cOhIk9fN X-Received: by 2002:a05:6402:26d6:b0:451:24da:f8cf with SMTP id x22-20020a05640226d600b0045124daf8cfmr20982641edd.385.1663686720763; Tue, 20 Sep 2022 08:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663686720; cv=none; d=google.com; s=arc-20160816; b=qYamT0d8Gc3NsB8J26KCGzDO+VFf/zOZX6bvhzLtmsfTgwMzY+KYDlG9YsjjQfcDGh 1s9e90vxH1nn+nFU7JAfU8YHQRDCM4EIwoBZyF+hbvOoQuf0XEhSEN6NU57hksdoKCMp 6ii5MSEucDDnaxAziBHem4PCFlDl6EojHhKuFzclI4cDeQ+H5n8WJwpPyzOAbygTIveA DMgM8+Y8dek+KRk1L7+I/p1e/whv/j2xcC9bGCcYVoX6iS5KpHwfhRyNSNJHu/ETAji9 pcJ1h3Had4C8P7SLfpJcfRBKHtJNyobXM4N6+bJXbRY1oTOy2YiHkLIcVhKYwez0coGG st8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RszqQLsUVQfAFJeEQ7hoI8g4RH+WeWcEr+tv0BYlD1w=; b=tvum86JPgQi0Xdt5bLcn9P28Lysn6Q6JW0auVAPjSgmfCushAvEoWtG44wMdCTxJHU /l7IwoUczvepvgKrzYiLPv/vDOdUXI01oiB1sbGAkq91qIb/0kb0o8qp9NXnRxcWn5Ml JItOlTJ4tr9K7AAymqoHCujurQH4GvXmhfdQ8m4jH6pJ3gTK8xSD8SzBvkjD5Ki2bEEz FGM4psE7ZROXBaOU2+lF3Wo0tKYLH3PKLcokWyPK1oXgCHs4/GlRSvrz2HRtZeboFYel PMqLDmJ8GxggyRoPn11S2ubFp6Ciy5H8P/TPsBS0zYcGSroW+X6pOg0QkE0ZufVyFfsE 3q+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oUCdR2MB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a056402271100b0044e80aabceasi17999edd.372.2022.09.20.08.11.35; Tue, 20 Sep 2022 08:12:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oUCdR2MB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231415AbiITO35 (ORCPT + 99 others); Tue, 20 Sep 2022 10:29:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231187AbiITO3y (ORCPT ); Tue, 20 Sep 2022 10:29:54 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5495FDFF9; Tue, 20 Sep 2022 07:29:52 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 29so4148543edv.2; Tue, 20 Sep 2022 07:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=RszqQLsUVQfAFJeEQ7hoI8g4RH+WeWcEr+tv0BYlD1w=; b=oUCdR2MByfag2AceIhidd4X0VO+EXvXQSVE80gvHh1j65Ep+rsNtuF/pRRCSVGqQez IF/zxdC/28zBNcQgKJJurMTp6qbA2m+bUSxan2c8YD88inPzcHsNFMpjX8TeuFY11loU xulHV/KGUDA+oHmzJZ5OL/c8rXfcVmsv9whNbc9fiBtj3VgIqP/9s4Q+mIYVbry4Twwl XnQgI5M0NWgaJowIkPCu8zr5g89q6XeUp6MblDYbUJ1aVQdkykK5hAB2dFe0+nntU8Y0 XvrAj00ngQIr1aZ1YNzLHodbDiIkvy9lChURy4FoBSqCIGgKd62pP2r1S1uLG6Gt8TVi WVKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=RszqQLsUVQfAFJeEQ7hoI8g4RH+WeWcEr+tv0BYlD1w=; b=5j6V3jkIQOdZB49s/UYps/8+uh2ys2KPxbhHJAYO+gpNaso3AM3yBwbypDIa8bPKbE ALYBkYspRIykWkD0EgekS5w4RgpdPoNATm8GXb7VOTzOaZ/9NjKJT+r4J2UCrz6OU0aO qRtMlZLd7WOqf+r15+IzJyT27asrFEzvwZSt+Zzz4bWi/41JfgVdM9VHnxk04N70QM1n khnWVzKDD9dIfpc5ODno3KofrLipoPqJToEOxEfPm+qKW2YPTHhoUcVIPcK5Mkjr8Gg+ BB/dykYPpb8Fy4Sk9deGpPeGPfcclpgq5BGPDaXHs4QTNV6MPC1VuEa/isnBNoEQmavU 60lw== X-Gm-Message-State: ACrzQf3bfOiFKPHUrAceWj/1/kdCXBV/Ol0b+sZqxOb8Ug76ZKOtWRng Shw/uhqddr8/V9kjOGDrgAs= X-Received: by 2002:a05:6402:156:b0:440:b458:93df with SMTP id s22-20020a056402015600b00440b45893dfmr21271644edu.337.1663684190299; Tue, 20 Sep 2022 07:29:50 -0700 (PDT) Received: from archbook.localnet (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id v11-20020a1709064e8b00b0073d87068042sm943378eju.110.2022.09.20.07.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:29:49 -0700 (PDT) From: Nicolas Frattaroli To: Linus Walleij , Bartosz Golaszewski , Dmitry Torokhov Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpiolib: Fix missing array end sentinel in quirks array Date: Tue, 20 Sep 2022 16:29:48 +0200 Message-ID: <2041321.FWP5BukD0m@archbook> In-Reply-To: <20220920142718.633062-1-frattaroli.nicolas@gmail.com> References: <20220920142718.633062-1-frattaroli.nicolas@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Dienstag, 20. September 2022 16:27:18 CEST Nicolas Frattaroli wrote: > Without the sentinel, the loop never actually terminates if there > are no quirks, and wreaks havoc across the kernel resulting in a > juicy panic. > > Fix this by adding a NULL at the end. > > Fixes: a2b5e207cade ("gpiolib: rework quirk handling in of_find_gpio()") > Signed-off-by: Nicolas Frattaroli > --- > drivers/gpio/gpiolib-of.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c > index 95be5f0d2623..1b60cd04883f 100644 > --- a/drivers/gpio/gpiolib-of.c > +++ b/drivers/gpio/gpiolib-of.c > @@ -498,6 +498,7 @@ static const of_find_gpio_quirk of_find_gpio_quirks[] = { > of_find_regulator_gpio, > of_find_arizona_gpio, > of_find_usb_gpio, > + NULL, > }; > > struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, > Disregard this, just saw it was already fixed[1]. Regards, Nicolas Frattaroli [1]: https://lore.kernel.org/linux-gpio/CAMRc=MeF-81yottUqqYdHmuFokysyNsXTgU+FOFWv7bL=QMJOg@mail.gmail.com/T/