Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp318611rdb; Thu, 5 Oct 2023 07:01:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDS1e1MvgKy+fQtgdnIQ1MPKTxVAWBpvehRDx9/blDlWNR0WcwEvkeqogJsRLf5gPmeehc X-Received: by 2002:a05:6a20:3d0d:b0:151:35ad:f331 with SMTP id y13-20020a056a203d0d00b0015135adf331mr4233327pzi.14.1696514467502; Thu, 05 Oct 2023 07:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696514467; cv=none; d=google.com; s=arc-20160816; b=st0wOvmaR4K89P1XEEJTtPJDb48gtc6d3UiM9UXaAsUGhGj2iDtQpHWMWm6CxzXdSs KHPiNPd0EJgm/smK6K+VVIMFf2bUMevKseAQ8fcUIYo0S/nQxjisZEKXdhzvWrEJIV3W VCOWmFcsF99ZCriiUtOlK7ySRsx7aIW0gTD4OM/bs8o0dneOwVCdIebj6tjgVqqfcBLl ReTOh6dX25dQVF0GgaYAY/2q9h6zLJmWCpno/MvRnUmq+VcaCruxF9srzfEoWnjt1fTK n6DRqi5WrAOf1kN4QEWsUghdlwOsx0+FHcZFIz6aM6mButGqkVMGa8NPie12GXbTcig6 GhCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Z1y0tR0I7mj7aDDCvbC4XLnLTleYemTWETFhz4bBo18=; fh=j8ELX6pnZkiSjNlzxa9rRdSMoWjhNDJ3rSE6zkbAAJg=; b=xdyE6uhRKCBk/3V8ZVFIUTdCKkxos2KI4DJtxiAR/O5RmkMTmOGX80P2Qw2sVhWTZb W8L4hLLrNdScy22ElnIjMrshRQq8vzLHjb82bifeYMNLkbrTg0BzVdSxrBIyEOlgJOyM s3MqUEFACXFrfoIjvDEMPcewl6Jkmv5AYbrC2mYzTf2mtZ01pvW3yhVZDV7OEcpE/t0w RML+iT1kFgxjqU8q1fFhxjJ2lFAxJoQ7/+Yr1iUzuR2vIdZbUqAZl0xPilL6lJ5z3GTs j5Nr9kQm/yPajgSUUJjELO8+UV+Zcvp62iUWQK6gdsNPePCcne3JYff95SsBnK5TNWjD B1TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=jNdiG4a7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id c7-20020a633507000000b005897bfc2ed1si550853pga.215.2023.10.05.07.01.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 07:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=jNdiG4a7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 057BC809C922; Thu, 5 Oct 2023 07:00:27 -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 S232387AbjJEN5y (ORCPT + 99 others); Thu, 5 Oct 2023 09:57:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbjJENzx (ORCPT ); Thu, 5 Oct 2023 09:55:53 -0400 Received: from mail-vk1-xa34.google.com (mail-vk1-xa34.google.com [IPv6:2607:f8b0:4864:20::a34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BC74A278 for ; Thu, 5 Oct 2023 02:30:07 -0700 (PDT) Received: by mail-vk1-xa34.google.com with SMTP id 71dfb90a1353d-49d55b90a5aso549661e0c.0 for ; Thu, 05 Oct 2023 02:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696498206; x=1697103006; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Z1y0tR0I7mj7aDDCvbC4XLnLTleYemTWETFhz4bBo18=; b=jNdiG4a7w8kkWqROMQr6VGJfgViu9OOR4MfVrrspU/vUvTyeGA8vW5z52nl6sZ8yik QrKhHrpWsUYHRnLtj3DMvfoFLjBUZajOxGBd7YidefqOHXZ7es8Uw3QqUnqh9HlPcOpV Zm992x8QYz/R/RFz+FX0WcG7ZdM7w46xLQ+E5prodKknYN21z8sUU7/akshahEKQqJiw +qqjuIwrcoEgM566YiWhqeS1sdlUBPrLvtTRU9nLxg3MLopng9CC6QceHA9DMC11u98+ CKmai9zqnUgaZZvvGcRhajXWdUZ7R43BQl29eKA+gbj21rEooRczcF2EHpD37WmJBRRf LJFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696498206; x=1697103006; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z1y0tR0I7mj7aDDCvbC4XLnLTleYemTWETFhz4bBo18=; b=ae0zS3YJzny4oddme27Nt7028fbiQMI0Nq3W5U3DbHnc7kKFU5krvneu67bTViS6Wm lJ9m4dZrFZPRBxjun5mPsbvEGoZXUFx9DqeUmsR0dN3blmqtjOkNSwPPxr2XjZEEBYTo UFTItP2bKbaE6jNWcWg6lnJIWy9QAnoAOE/nWkBDfFBSd5u6q3IuPPoTvmv7O+Iji3Ve 3V1TuUYj/zw4rcvW+ETKuXogYj3PL6nFwwgmgj+oiVeyzyfzfZWrunNQ/Lc45tcacT8g ezv0rR7xToRUUCSCF0+flnubjZ21rs1u/tM/b4pPWAMNVFR+GRcL8y0sGpi8mnS41CPh mZDA== X-Gm-Message-State: AOJu0YysbwTJhAAhjbyLO9EOQAB15A410HnzG9EMS1E7m49tlIstqmAZ /S6hyEI+mbKBxoPIZ342Hn7CGPY5yVCQs5JWhJzDlQ== X-Received: by 2002:a1f:62c1:0:b0:496:187e:b33f with SMTP id w184-20020a1f62c1000000b00496187eb33fmr1057703vkb.3.1696498206138; Thu, 05 Oct 2023 02:30:06 -0700 (PDT) MIME-Version: 1.0 References: <20231004183906.97845-1-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Thu, 5 Oct 2023 11:29:55 +0200 Message-ID: Subject: Re: [PATCH] spi: bcm2835: add a sentinel at the end of the lookup array To: Andy Shevchenko Cc: Mark Brown , Florian Fainelli , Linus Walleij , Ray Jui , Scott Branden , Broadcom internal kernel review list , linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , Hans de Goede Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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]); Thu, 05 Oct 2023 07:00:28 -0700 (PDT) On Thu, Oct 5, 2023 at 11:10=E2=80=AFAM Andy Shevchenko wrote: > > On Wed, Oct 04, 2023 at 08:39:06PM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > GPIOLIB expects the array of lookup entries to be terminated with an > > empty member. We need to increase the size of the variable length array > > in the lookup table by 1. > > Right and seems we (used to?) have the same mistake spread over the kerne= l. Almost all lookup tables are static and have a sentinel appended. The temporary lookup hack is only used here and in the int3472 driver AFAIK so it's not that bad. > Perhaps a helper at some point? > I don't want to make it a habit for people. This is still a hack, just less bad than what was here before. So I don't think we need a helper here. Bart > Reviewed-by: Andy Shevchenko > > -- > With Best Regards, > Andy Shevchenko > >