Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp56529ybz; Tue, 28 Apr 2020 18:06:11 -0700 (PDT) X-Google-Smtp-Source: APiQypItagMdG0dtbA3vi+XyAvCIAgcGHp6cY5tcsZ7UCUTAAjDXWGUZ1DQZuJKhPWisz0WdP1di X-Received: by 2002:a05:6402:1c07:: with SMTP id ck7mr393875edb.202.1588122371760; Tue, 28 Apr 2020 18:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588122371; cv=none; d=google.com; s=arc-20160816; b=KsMgliJc58owUNZMK0KnooYHUDSMpmpNCzTqu86aQqaF67AJdh/Rb6/TCH36UDJP7j tEEv9oHh3/FjsQ/RF+F9KZ0mK52UYKcS87vqSUAYMAirg+eKjCA/AhgehZilPg8UIINg rfi5vH/H30Alz1L7DIXQrnX3Hqd+CpJh07aAAAWJfGuSxqnZmFVjqOacoDaEUBIN9F/k KelqVKDevfbWhyoJ/h5aHieyzOBoWIm+5AwVnBoUMgfXx1E1zNc5Gtz6AFIfYRvS7vL0 dEdSCkwn5pBjvWMITooHpjEypTvWGa0jnS/IK/ZZFlmZX3T5A1esfg5Hm7nEJfSfQ3Ym EQfA== 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=Ug/wQBq+seIv85+u2EtcllFYAZBy4VzDUqZGrZ7xOnU=; b=H6fXTPFuM2o5u5LrINIF6EBC41nX1RgjrBSLiDozBlToGARpZRLp7v66CRmnonO3ET kM+tcZMpVnshhiKD2+V8WkCE/vYLGQx8UTh0jpcPlpggeS5Ud8pq6UBJP4rsTkr+rduJ F6G1shhFmqTUjZXpEpSNnh5gNeJHAkpfVZiwEnZmxpibEcaDVRg8vtmKKfTSmXk9pdXS gWo7q5rhfrW9bRr5rL/vkiivn2CMwMyVEa2DuBPTowSigiRmkBKUbzHK2/59lE6VBG4F lZ50ORDEqQ8Tgh6CocA6peYexaAf0OpfoUdpHLdBd3D0QNaAUiM7wYM9p07mIm0kkbaK IF4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ctXjV+yh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz17si2836390ejc.528.2020.04.28.18.05.47; Tue, 28 Apr 2020 18:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ctXjV+yh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726447AbgD2BET (ORCPT + 99 others); Tue, 28 Apr 2020 21:04:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726420AbgD2BET (ORCPT ); Tue, 28 Apr 2020 21:04:19 -0400 Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com [IPv6:2607:f8b0:4864:20::942]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03188C03C1AD for ; Tue, 28 Apr 2020 18:04:18 -0700 (PDT) Received: by mail-ua1-x942.google.com with SMTP id c24so264380uap.13 for ; Tue, 28 Apr 2020 18:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ug/wQBq+seIv85+u2EtcllFYAZBy4VzDUqZGrZ7xOnU=; b=ctXjV+yhq6JeHZvZNcwG18SVfTkYgUdvzrnoQROO9BzA6lP0VohAxOBsAZg8X9lOzi 0JD5d8V0/fSEioGYUmhk1XwRLkpEWZ0lt/6Z8yWOizAflbOeVrCWIO1/bYYKh+z/Mj6P UNBOdJM66TBcRvyJEv51fG26dSdvrWZAnaT3Y= 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=Ug/wQBq+seIv85+u2EtcllFYAZBy4VzDUqZGrZ7xOnU=; b=uGSbQti+DuiXalE365Ygf/Yzwg95QtAeJxi2LSd/hoI9QCYGuOBdLyEvs4kEU1B0XC PUATQkbvfYA4G836XLdCWpoHT3dwdBTIszhN9IarWCDlGPDE/g/S/mQHnhFRFEa2gTqh y9EGJuBUdrVJqJZzGGObVirfbdwya1fNNcp0VnUTj/cAPF5Yfz+46ByUYRkboG4jE2K+ o/4HFiu1VxsMkHk16iQmI1NDTdJo2En+RBbf2XyZe/Bah4HURhWSWn/1ppOzye3/4mvJ BKnE2hNTUzxAkd2/6AMa1IHaKK9NBke+AUAamFeHhp93YKOW2vkBKA1SHxGSTK+WL1YJ 0nmA== X-Gm-Message-State: AGi0PuYF+hUzHAwayuJIsJ4xAW+gYNQXKdY4SNmvGT0sYqPsOCOM0NaL lnxoIVnGRNohWxyKueLw6uYeIMjbZNI= X-Received: by 2002:a9f:20c1:: with SMTP id 59mr23194121uaa.59.1588122257798; Tue, 28 Apr 2020 18:04:17 -0700 (PDT) Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com. [209.85.217.44]) by smtp.gmail.com with ESMTPSA id 66sm4398084vss.16.2020.04.28.18.04.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Apr 2020 18:04:17 -0700 (PDT) Received: by mail-vs1-f44.google.com with SMTP id g184so250409vsc.0 for ; Tue, 28 Apr 2020 18:04:16 -0700 (PDT) X-Received: by 2002:a67:c40c:: with SMTP id c12mr23855086vsk.106.1588122256302; Tue, 28 Apr 2020 18:04:16 -0700 (PDT) MIME-Version: 1.0 References: <20200428172322.1.I396f351e364f3c09df7c7606e79abefb8682c092@changeid> <20200428172322.2.Iacb3c8152c3cf9015a91308678155a578b0cc050@changeid> In-Reply-To: From: Doug Anderson Date: Tue, 28 Apr 2020 18:04:04 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] gpio: Make "offset" and "unsigned int", not just "unsigned" To: Joe Perches Cc: LinusW , Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" , LKML 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 Hi, On Tue, Apr 28, 2020 at 5:57 PM Joe Perches wrote: > > On Tue, 2020-04-28 at 17:50 -0700, Doug Anderson wrote: > > Hi, > > > > On Tue, Apr 28, 2020 at 5:38 PM Joe Perches wrote: > > > On Tue, 2020-04-28 at 17:23 -0700, Douglas Anderson wrote: > > > > When I copied the function prototypes from the GPIO header file into > > > > my own driver, checkpatch yelled at me saying that I shouldn't use use > > > > "unsigned" but instead should say "unsigned int". Let's make the > > > > header file use "unsigned int" so others who copy like I did won't get > > > > yelled at. > > > > > > There are a few other unsigned declarations in the file. > > > > There are? I swear I looked for them before I sent my patch and I > > couldn't find them. Then I looked again upon seeing your reply and I > > still can't find them. My eyes are bad, though. Maybe you can give > > me specifics? > > $ git grep -P -n '\bunsigned\s+(?!int|long)' include/linux/gpio/driver.h > include/linux/gpio/driver.h:352: unsigned offset); > include/linux/gpio/driver.h:354: unsigned offset); > include/linux/gpio/driver.h:356: unsigned offset); > include/linux/gpio/driver.h:358: unsigned offset); > include/linux/gpio/driver.h:360: unsigned offset, int value); > include/linux/gpio/driver.h:362: unsigned offset); > include/linux/gpio/driver.h:367: unsigned offset, int value); > include/linux/gpio/driver.h:372: unsigned offset, > include/linux/gpio/driver.h:375: unsigned offset); > include/linux/gpio/driver.h:462: unsigned offset); > include/linux/gpio/driver.h:660:int gpiochip_generic_request(struct gpio_chip *gc, unsigned offset); > include/linux/gpio/driver.h:661:void gpiochip_generic_free(struct gpio_chip *gc, unsigned offset); > include/linux/gpio/driver.h:662:int gpiochip_generic_config(struct gpio_chip *gc, unsigned offset, ...riiiiiggght. ...and now I run your sed script _after_ my patch and I get no hits. ...so I'm still confused about what you want me to do that's not already done in my patch. > > > Maybe do all of them (and remove the unnecessary externs)? > > > > You mean just remove the word "extern" everywhere in this file? Sure, > > I can if you want. > > Up to the actual maintainers I suppose. > There are only a few extern function declarations. > Most do not use extern. OK, maybe I'll wait for Linux W. or Bartosz to weigh in unless there is some Linux policy against using "extern" in header files? > > > trivial reformatting of the function pointer block too > > > > Wow, I must be totally out of it. Maybe it's the gin and tonic I just > > had. I don't understand this comment either. Can you clarify? > > int (*foo)(..., > ...); > > might be better with fewer tabs between return type and function pointer > > int (*foo)(..., ...); I'll wait for Linux W. or Bartosz to weigh in here, since it feels more like a style decision. Happy to add a patch for it, though. -Doug