From owner-freebsd-bugs@FreeBSD.ORG Sun May 15 18:00:22 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A7D1106567D for ; Sun, 15 May 2011 18:00:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4B72F8FC17 for ; Sun, 15 May 2011 18:00:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4FI0Mlv092591 for ; Sun, 15 May 2011 18:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4FI0MdP092584; Sun, 15 May 2011 18:00:22 GMT (envelope-from gnats) Resent-Date: Sun, 15 May 2011 18:00:22 GMT Resent-Message-Id: <201105151800.p4FI0MdP092584@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henrik Brix Andersen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D86E1065673 for ; Sun, 15 May 2011 17:52:23 +0000 (UTC) (envelope-from brix@drpepper.brixandersen.dk) Received: from solow.pil.dk (relay.pil.dk [195.41.47.164]) by mx1.freebsd.org (Postfix) with ESMTP id 0377F8FC14 for ; Sun, 15 May 2011 17:52:22 +0000 (UTC) Received: from drpepper.brixandersen.dk (0x55534f5f.adsl.cybercity.dk [85.83.79.95]) by solow.pil.dk (Postfix) with ESMTPA id EA15F1CC00D for ; Sun, 15 May 2011 19:52:20 +0200 (CEST) Received: by drpepper.brixandersen.dk (Postfix, from userid 1001) id 4CB951CC32; Sun, 15 May 2011 19:52:20 +0200 (CEST) Message-Id: <20110515175220.4CB951CC32@drpepper.brixandersen.dk> Date: Sun, 15 May 2011 19:52:20 +0200 (CEST) From: Henrik Brix Andersen To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/157070: Improve API description in gpio_if.m X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Henrik Brix Andersen List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 May 2011 18:00:22 -0000 >Number: 157070 >Category: kern >Synopsis: Improve API description in gpio_if.m >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 15 18:00:21 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Henrik Brix Andersen >Release: FreeBSD 9.0-CURRENT i386 >Organization: >Environment: System: FreeBSD drpepper.brixandersen.dk 9.0-CURRENT FreeBSD 9.0-CURRENT #3 r221961: Sun May 15 17:11:34 CEST 2011 root@drpepper.brixandersen.dk:/usr/obj/usr/home/brix/projects/freebsd/src/head/sys/GENERIC i386 >Description: The API description for the GPIO_PIN_MAX() method is misleading. The function should provide the maximum supported pin_num, not the total number of pins. Most (if not all) in-tree GPIO drivers already name the second argument to this function 'maxpin', which seems less confusing. >How-To-Repeat: >Fix: The following patch improves the API description and renames the second argument to better reflect the intent. --- gpio_if.m.diff begins here --- Index: sys/dev/gpio/gpio_if.m =================================================================== --- sys/dev/gpio/gpio_if.m (revision 221961) +++ sys/dev/gpio/gpio_if.m (working copy) @@ -32,11 +32,11 @@ INTERFACE gpio; # -# Get total number of pins +# Get the maximum pin_num # METHOD int pin_max { device_t dev; - int *npins; + int *maxpin; }; # --- gpio_if.m.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: