lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	09 Nov 2006 09:26:02 +0200
From:	Andrew Victor <andrew@...people.com>
To:	David Brownell <david-b@...bell.net>
Cc:	hskinnemoen@...el.com, linux-kernel@...r.kernel.org, akpm@...l.org
Subject: Re: [-mm patch 1/4] GPIO framework for AVR32

hi David,

> > > 	* int gpio_set_direction(unsigned gpio, int is_in /* or
> > >           		is_out? */)
> > >         ... returning 0 or negative errno (for invalid gpio)
> >
> > I think set_output_enable makes more sense, but maybe it's just me.
> 
> It's just you.  :)
> 
> A "set enable" idiom is linguistically redundant too; "set" suffices,
> or "enable".  Both imply a need for an opposite "clear" or "disable.
> "Direction" is a more obvious notion; the parameter should likely be
> a symbol like GPIO_IN or GPIO_OUT.

We originally had at91_set_gpio_direction() in the AT91 GPIO layer, and
that seemed to cause confusion  (eg, do I pass a 1 or 0 to enable output
mode?)

So I'd personally prefer to keep gpio_set_input() and
gpio_set_output().  (alternative is "enable" instead of "set").  I think
it's more readable.


Regards,
  Andrew Victor


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ