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]
Message-ID: <87potsjw74.fsf@intel.com>
Date:	Thu, 14 Apr 2016 13:55:59 +0300
From:	Felipe Balbi <balbi@...nel.org>
To:	Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
	Sudip Mukherjee <sudipm.mukherjee@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-usb\@vger.kernel.org" <linux-usb@...r.kernel.org>
Subject: RE: [PATCH] usb: renesas_usbhs: fix signed-unsigned return


Hi,

Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com> writes:
>> From: Sudip Mukherjee
>> Sent: Saturday, April 09, 2016 12:05 AM
>> 
>> The return type of usbhsp_setup_pipecfg() was u16 but it was returning
>> a negative value (-EINVAL). Instead lets return a pointer to u16 which
>> will hold the value to be returned or in case of error, return the
>> error code in ERR_PTR.
>
> Thank you for the patch!
> I also think this usbhsp_setup_pipecfg() should return error code using correct variable type.
>
> However, I would like to avoid to use ERR_PTR and kmalloc() somehow because
> I feel this patch is complex a little.
> How about the usbhsp_setup_pipecfg() prototype is changed like the following?
>
> static int usbhsp_setup_pipecfg(struct usbhs_pipe *pipe,
> 				int is_host, int dir_in, u16 *pipecfg);

IMO, this makes much more sense.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (819 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ