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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 8EC97C433B4 for ; Tue, 27 Apr 2021 18:09:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67F7E60BBB for ; Tue, 27 Apr 2021 18:09:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236740AbhD0SKb (ORCPT ); Tue, 27 Apr 2021 14:10:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:37264 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235505AbhD0SK3 (ORCPT ); Tue, 27 Apr 2021 14:10:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8D4E760FDC; Tue, 27 Apr 2021 18:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619546986; bh=A2/WCFmcB4YcVkQg4351PRfU64Y/d3EZ0rzxaDaOmVQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g1kyynzTD4aEdm5ElfOvPoljDveCa8L1RwNsZrCaxZZoRPnZDfm1nzuLAmg48B7Sa b8LE1n4QgiEa8A5R/O/nr6d8fN4jMPcTDpqFfqfio64TthpbT99chvKYSoMyWGpmuE DvqEGHNIguGE98rDbL/Abc822aF6wyGmJ303c4FA= Date: Tue, 27 Apr 2021 20:09:43 +0200 From: Greg Kroah-Hartman To: Sergio Paracuellos Cc: Iain Craig , Matthias Brugger , linux-staging@lists.linux.dev, linux-kernel Subject: Re: [PATCH] staging: mt7621-pci: fix a multiple assignment code style issue Message-ID: References: <20210427174719.GA14124@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 27, 2021 at 07:55:30PM +0200, Sergio Paracuellos wrote: > Hi Iain. > > On Tue, Apr 27, 2021 at 7:47 PM Iain Craig wrote: > > > > avoid multiple assignments while setting pcie->io members to NULL. > > > > Signed-off-by: Iain Craig > > --- > > drivers/staging/mt7621-pci/pci-mt7621.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c > > index 115250115f10..f3b5b8ac03b5 100644 > > --- a/drivers/staging/mt7621-pci/pci-mt7621.c > > +++ b/drivers/staging/mt7621-pci/pci-mt7621.c > > @@ -306,7 +306,9 @@ static int mt7621_pci_parse_request_of_pci_ranges(struct pci_host_bridge *host) > > * resource manually instead. > > */ > > pcie->io.name = node->full_name; > > - pcie->io.parent = pcie->io.child = pcie->io.sibling = NULL; > > + pcie->io.parent = NULL; > > + pcie->io.child = NULL; > > + pcie->io.sibling = NULL; > > In this particular case I think the original code is correct as it is. > Also this is the style used around different kernel places to assign > these fields. THe original is fine. thanks, greg k-h