From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ACA3C35247 for ; Mon, 3 Feb 2020 10:21:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C09A2080D for ; Mon, 3 Feb 2020 10:21:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727183AbgBCKU5 (ORCPT ); Mon, 3 Feb 2020 05:20:57 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:39616 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbgBCKU5 (ORCPT ); Mon, 3 Feb 2020 05:20:57 -0500 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23990395AbgBCKUqnryg0 (ORCPT + 2 others); Mon, 3 Feb 2020 11:20:46 +0100 Date: Mon, 3 Feb 2020 10:20:46 +0000 (GMT) From: "Maciej W. Rozycki" To: Dan Carpenter cc: Christophe JAILLET , Ralf Baechle , "David S. Miller" , Andrew Morton , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] defxx: Fix a sentinel at the end of a 'eisa_device_id' structure In-Reply-To: <20200203095553.GN1778@kadam> Message-ID: References: <20200202142341.22124-1-christophe.jaillet@wanadoo.fr> <20200203095553.GN1778@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 3 Feb 2020, Dan Carpenter wrote: > > diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c > > index 077c68498f04..7ef0c57f07c6 100644 > > --- a/drivers/net/fddi/defxx.c > > +++ b/drivers/net/fddi/defxx.c > > @@ -3768,11 +3768,11 @@ static void dfx_pci_unregister(struct pci_dev *pdev) > > > > #ifdef CONFIG_EISA > > static const struct eisa_device_id dfx_eisa_table[] = { > > - { "DEC3001", DEFEA_PROD_ID_1 }, > > - { "DEC3002", DEFEA_PROD_ID_2 }, > > - { "DEC3003", DEFEA_PROD_ID_3 }, > > - { "DEC3004", DEFEA_PROD_ID_4 }, > > - { } > > + { "DEC3001", DEFEA_PROD_ID_1 }, > > + { "DEC3002", DEFEA_PROD_ID_2 }, > > + { "DEC3003", DEFEA_PROD_ID_3 }, > > + { "DEC3004", DEFEA_PROD_ID_4 }, > > + { "" } > > You haven't changed runtime at all. :P (struct eisa_device_id)->sig[] > is an array, not a pointer. There is no NULL dereference because an > array in the middle of another array can't be NULL. Right, the code is good as it stands (I should have more faith in my past achievements ;) ). Except for the whitespace issue, which I suppose might not be worth bothering to fix. Thanks for your meticulousness! Maciej