From: Daniel M German
Use min_t to find the minimum of two values instead of using the ?: operator.
This change does not alter functionality. It is merely cosmetic intended to
improve the readability of the code.
Signed-off-by: Daniel M German
---
drivers/usb/gadget/function/u_ether.c | 2 +-
uot;Beauty is the first test; there is no
permanent place in the world for ugly
G. H. Hardy -> mathematics."
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .
From: Daniel M German
Use min_t to find the minimum of two values instead of using the ?: operator.
We use min_t instead of min to avoid the compilation warning 'comparison of
distinct pointer types lacks a cast'.
This change does not alter functionality. It is merely cosmetic intended to
impro
e. I
agree. I'll address this issue.
Sorry for the wasted bandwidh, and thank you for the suggestion,
--dmg
atch.
>
> thanks,
>
> greg k-h
--
Daniel M. German "The fear is not losing.
Phil Jackson -> The fear is not producing the effort needed."
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .
Greg KH writes:
> On Tue, Jun 18, 2019 at 10:22:52AM -0700, dmg wrote:
>>
>> Greg KH writes:
>>
>> >> diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
>> >> index 9465fb95d70a..4a9fa3152f2a 100644
>> >> --- a/driver
From: Daniel M German
Replace ?: with min to calculate the number of bytes in the secondary buffer,
including changing the data type of data_in_secondary to size_t to be
type-consistent. data_in_secondary can never be negative.
Remove some spurious calculations (copy_to_user returns zero on succ
From: Daniel M German
snprintf returns the actual length of the buffer created; however,
this is not the case if snprintf truncates its parameter.
See https://lwn.net/Articles/69419/ for a detailed explanation.
The current code correctly handles this case at the expense
of extra code in the retur
way to deal with this?
casting size_t to long unsigned int will work, but it sounds kind of
ugly.
thank you,
--daniel
--
Daniel M. German "We die. That may be the meaning of life.
But we do language. That may be
Toni Morrison ->
From: Daniel M German
Replace ?: with min to calculate the number of bytes in the secondary buffer,
including changing the data type of data_in_secondary to size_t to be
type-consistent. data_in_secondary can never be negative.
Remove some spurious calculations (copy_to_user returns zero on succ
From: Daniel M German
Replace ?: with min to calculate the number of bytes in the secondary buffer,
including changing the data type of data_in_secondary to size_t to be
type-consistent. data_in_secondary can never be negative.
Remove some spurious calculations (copy_to_user returns zero on succ
d...@turingmachine.org writes:
> From: Daniel M German
>
Sorry, I put a spurious line in the body of the email. I am resending.
--dmg
12 matches
Mail list logo