Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1011560imm; Fri, 14 Sep 2018 09:43:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYccbO4jMh9Vvro3EoYT8Nw8oX70Id7OXCheH2On14spGNo+hFqPLPZmxTPOee8MI8xV6an X-Received: by 2002:a63:144b:: with SMTP id 11-v6mr12318971pgu.219.1536943394083; Fri, 14 Sep 2018 09:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536943394; cv=none; d=google.com; s=arc-20160816; b=FchjpRdEsXlAxvff72SXp2ia8jdUF/PGVLqBaUSJYXs/aBPC9wX1xpWqHHB7yvuZl0 gZ7KVlYphJQ5jJa4oigMNvps4k/nv9Wk60Jh2udi5A4Vviy3iZ6sz+8dBI8sGKjidOjz URBF5HDRuvJuIE8444n/3kHgn/TChJBEgMJvjSya+6elUf+atd8sDqPA0yXGLuJAWraG Zb14h3yIz0zqDUGtff966qiPpMYEiwtYdN9kkF7VNU+36lc7QN2YYJxHkHVg39kqinOy dmwg0axj54Iu7BDd3HdXAUD72Wcbn9RRGxC98amf8NAHMus0RrdIvHnEs+2FRVwd6N7Z xdqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fDW3CItelxwGxiGr0DrkerVJMp6hA7QTQqUn/xuAv70=; b=VpuLoEPnM9Rssy3BrlTbr1UKjsJ3sTaiKLcLLCIDuatvsgYnmsGN+9iQxAeIh2xH4S XUbKbMP5vdp/Sn3QDSzKL0MxzCCr7UJYQeRDN2FZzU8WKzCxdhF9McHdqNgWE4GhHJOz HzYnpONTnkXhzkOs/Gu9u+h3PU5H3m9JMtWMM8t7aqCLoBYlJ8f74ygeWRuI6geuzcvy s4R8/S6IUFq9ZAUPjssEXSlqtimEU22veuC7+33auqGEOS4MMkAMW5HhmFpnWiBVE/uB iDJZfr8NPjmRQJxtxFqgyguf1FgLYz3mYRMOdfgGY54gPWbs58RiekRnYA/9cHoSql7S mLGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JYxi9tYI; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4-v6si7527706pll.384.2018.09.14.09.42.57; Fri, 14 Sep 2018 09:43:14 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=JYxi9tYI; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728162AbeINV6D (ORCPT + 99 others); Fri, 14 Sep 2018 17:58:03 -0400 Received: from mail-lf1-f54.google.com ([209.85.167.54]:39041 "EHLO mail-lf1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726902AbeINV6D (ORCPT ); Fri, 14 Sep 2018 17:58:03 -0400 Received: by mail-lf1-f54.google.com with SMTP id v77-v6so8416037lfa.6 for ; Fri, 14 Sep 2018 09:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fDW3CItelxwGxiGr0DrkerVJMp6hA7QTQqUn/xuAv70=; b=JYxi9tYImVMYOhCvz89SAP7bRw9YXT1/KjPTQpk9gb4u3I2Z8+gZIf8hEwaK3WmzFC avvJUBTyhG7TJOjwA7o66r9h6KEOyy9hSf4ofDR34DffQz/Ngv0Vkxu6eunhhF6jOu8C IEJPfO7F91PsyNDMWjuhgiX9w32MRadid0fWRyK2PO3ba7pj8wrlb+HgeVygRYu1wunl lUskF6guyPP9BeIk1rXUVHjWkFT0WcdAOAS6UNg52SrUXF3dvJ0mO7XVYfly4i66VLGj X+emWL4m8vIMK46HlJtnnXMj1ZjnQ2SN1pY9EojncwhQT0eijeHXOu3jDnG9diJN2Jcb xRxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fDW3CItelxwGxiGr0DrkerVJMp6hA7QTQqUn/xuAv70=; b=Ylu+9Ya47k+RIH/VcONi4bUohzSZeLJWTrxcz/PtwkSWJqepwgwBCXxgsNpNLemO75 LlpI56Fk7GThVGOOR5SX0PBmd+4+GEPDI5gOEl3OOyR45mImwOqYhl5fa4B0H03TGK/h SgAhCgI/fDFZRFlGDNb2THKrWqE23YNMTXEGS8hdeIuLW220X6f+pVWUmZ5Y2VP3+5EC 5Lh/vTUP30sJMxBjS18GWVgGqEh33KER4w9kbM6AAPAUi73/5s1QKq32qLmw5BrKYmOs ePVtaEDyZq1Tgf2n9CAQZbkUM8uOhRA5Xv3H3B1HCy5DlFW41ajS/m2n+0w5xTGrRQFM NCgw== X-Gm-Message-State: APzg51BNyYq42pbjC7p1uy3FBWuuHz4vlhxgsJy7T2ZDVFnD51TPdA5Z eEDy94LIAhA05TIPH+OFqL5tJWYq7NqVjKvLWf5X8eCy X-Received: by 2002:a19:ead4:: with SMTP id y81-v6mr8930869lfi.110.1536943364332; Fri, 14 Sep 2018 09:42:44 -0700 (PDT) MIME-Version: 1.0 References: <20180827182315.126345-1-rkir@google.com> <20180827182315.126345-7-rkir@google.com> <20180914133044.GB16982@kroah.com> In-Reply-To: <20180914133044.GB16982@kroah.com> From: Roman Kiryanov Date: Fri, 14 Sep 2018 09:42:32 -0700 Message-ID: Subject: Re: [PATCH 07/20] platform: goldfish: pipe: Replace an array of 1 with a variable To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Todd Kjos Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yes, in the later change I am going to retire this variable completely. Could you please accept this patch as it? On Fri, Sep 14, 2018 at 6:30 AM Greg KH wrote: > > 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