Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp796406imm; Fri, 14 Sep 2018 06:31:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbwvLnlIoYNrr1yrXxaibebDUtUiAXQRfIB1sDAgHGFMQVmlBxh94oBklIS3vYbms5s0LgX X-Received: by 2002:a62:f208:: with SMTP id m8-v6mr12595434pfh.222.1536931906021; Fri, 14 Sep 2018 06:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536931906; cv=none; d=google.com; s=arc-20160816; b=RYxYS5rs+12rZ5BUga6Hzl8RZvLK+y3oM91A+QV/VkK6RitIBcM5TL7xgV9dS4dXS8 PBQvCSoLPtezZYxsmzVRtLAfyMTWCMaAmx5p9aifBORGIFiP9r2RLIs7fdreLUGd5XFb rvychaGLAuTRm9OS2Nq9VwFaNOYlXxaVBDYfG6uUNxXxbKwyVHHkaGuy+qLEEvd++sNf vKahiWhVlF2/t5rIMOSTOgrO6GJeVLWB/CFpJtSi2xogQkVxLWmvyUzY28WUUP8MkMW7 HWFIBDRt6tAwV9bpcqCzYCduY3Seen4mw4mcXT46/WT7kubcP9x8hU/w+mqwFT/3Soa+ njuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=tAmk58XcUYeqlX8SPfMdtqaQiHw5clnh1tE5wwVYS34=; b=Cf+752kZ56zLIgdgysUF/DMy+ljxv9wTrVeJEn8CokA9ICX14Iela4H/W/gvENpLy4 5+Wcbvn9z6Bmk8dlhueBa263dDaeYIfYdDN3eovqa6LkhRfoJQbKb2WGDvXSkCTn5552 68LTEohQrqnp4s9VcWJ0Dof+2NEAPggcn08DEANwmidEfi7LLOPRid3nCFrbtzibfm/J lqcSRez7nVhTIItfOJy6k3HuvYRo40w/VS/n/BlkiRMuaoIkay8Lp9azJWX3nnxjXStl 4wraCgwmVodBXPXsBjRinasko1xKWtyspQY1D4pILUVGPKTNMbhx32eyuCfRm+Vqz3hG AqWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7-v6si6658927plq.163.2018.09.14.06.31.19; Fri, 14 Sep 2018 06:31:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728196AbeINSpT (ORCPT + 99 others); Fri, 14 Sep 2018 14:45:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36072 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727864AbeINSpT (ORCPT ); Fri, 14 Sep 2018 14:45:19 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3D516D61; Fri, 14 Sep 2018 13:30:47 +0000 (UTC) Date: Fri, 14 Sep 2018 15:30:44 +0200 From: Greg KH To: rkir@google.com Cc: linux-kernel@vger.kernel.org, tkjos@google.com Subject: Re: [PATCH 07/20] platform: goldfish: pipe: Replace an array of 1 with a variable Message-ID: <20180914133044.GB16982@kroah.com> References: <20180827182315.126345-1-rkir@google.com> <20180827182315.126345-7-rkir@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180827182315.126345-7-rkir@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 27, 2018 at 11:23:02AM -0700, rkir@google.com wrote: > From: Roman Kiryanov > > There is no reason to have an array of 1. > > Signed-off-by: Roman Kiryanov > --- > drivers/platform/goldfish/goldfish_pipe.c | 28 +++++++++++------------ > 1 file changed, 13 insertions(+), 15 deletions(-) > > diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c > index 24e40deb98cc..e9e3e791c0d4 100644 > --- a/drivers/platform/goldfish/goldfish_pipe.c > +++ b/drivers/platform/goldfish/goldfish_pipe.c > @@ -205,7 +205,7 @@ struct goldfish_pipe_dev { > unsigned char __iomem *base; > }; > > -static struct goldfish_pipe_dev pipe_dev[1] = {}; > +struct goldfish_pipe_dev goldfish_pipe_dev; Why do you need a static structure at all? Shouldn't this be tied to the dynamic device the driver core gives you? That way you can handle any number of these devices without any code changes needed. thanks, greg k-h