if xprt->debugfs->d_name.name can be what ever long
it is more clever to use kasprintf()
the some for link (no idea how many xprt als possible)
jm2c
wh
Von: Fedor Tokarev [ftoka...@gmail.com]
Gesendet: Donnerstag, 15. Oktober 2020 15:59
An: bfie...@field
just a notice:
from my casual observation i noticed that most people expect
a function to return NULL on error (as seen here). So i would suggest
to return NULL and (if needed) the error code otherwise.
jm2c,
re
wh
Von: kernel-janitors-ow...@vger.kernel.o
if someone has same spare time,
this driver need a bit more love ...
SO far i can see in rtl92ee_phy_iq_calibrate:
* IQK_MATRIX_REG_NUM should be used instead 8 hardcoded.
* the for-loop in the beginning is obfuscating that it sets simply
final_candidate
this can be cleaned:
reg_e94 = res
IMHO it would be better to use switch case here to improve readability.
switch (bmcr & mask) {
case BMCR_SPEED1000:
speed = SPEED_1000;
break;
case BMCR_SPEED100:
speed = SPEED_100;
Am 19.02.2019 10:06, schrieb Mao Wenan:
> This patch is to do code cleanup for ns83820_probe_phy().
> It deletes unused variable 'first' and commented out code.
>
> Signed-off-by: Mao Wenan
> ---
> v2->v3: delte unused variable 'first'; change subject from
> "net: ns83820: drop pointless st
Am 19.02.2019 10:06, schrieb Mao Wenan:
> This patch is to do code cleanup for ns83820_probe_phy().
> It deletes unused variable 'first' and commented out code.
>
> Signed-off-by: Mao Wenan
> ---
> v2->v3: delte unused variable 'first'; change subject from
> "net: ns83820: drop pointless sta
Hello Vasily Averin,
just a general hint:
when you send new versions of a patch please document also
what you have changed. Here an example from an other ML:
The problematic code looks like this:
res_seq = res_hdr->xd_hdr.length_sn & TB_XDOMAIN_SN_MASK;
res_seq >>= TB_XDOMAIN_SN_S
Am 01.11.2017 09:49, schrieb Colin King:
> From: Colin Ian King
>
> stat set to zero and the value is never read, instead stat is
> set again in the do-loop. Hence the setting to zero is redundant
> and can be removed. Cleans up clang warning:
>
> drivers/net/wan/wanxl.c:737:2: warning: Value
Am 20.10.2017 18:06, schrieb Gustavo A. R. Silva:
> Hi Walter,
>
> Quoting walter harms :
>
>> Am 19.10.2017 19:27, schrieb Gustavo A. R. Silva:
>>> Code refactoring in order to make the code easier to read and maintain.
>>>
>>> Signed-off-by: G
Am 19.10.2017 19:27, schrieb Gustavo A. R. Silva:
> Code refactoring in order to make the code easier to read and maintain.
>
> Signed-off-by: Gustavo A. R. Silva
> ---
> This code was tested by compilation only (GCC 7.2.0 was used).
>
> net/netrom/nr_route.c | 63
> -
Am 15.08.2017 08:50, schrieb Colin King:
> From: Colin Ian King
>
> The returns on some if statements are not indented correctly,
> add in the missing tab.
>
> Signed-off-by: Colin Ian King
> ---
> net/bridge/netfilter/ebt_ip.c | 4 ++--
> net/bridge/netfilter/ebt_ip6.c | 2 +-
> 2 files ch
Am 17.05.2017 15:42, schrieb Firo Yang:
> On Wed, May 17, 2017 at 02:59:39PM +0200, walter harms wrote:
>>
>>
>> Am 17.05.2017 14:35, schrieb Firo Yang:
>>> The divisor s->par.bitrate will always be 0 until initialized by
>>> ndo_open() and hdlcdrv_o
Am 17.05.2017 14:35, schrieb Firo Yang:
> The divisor s->par.bitrate will always be 0 until initialized by
> ndo_open() and hdlcdrv_open().
>
> In order to fix this divide zero error, check whether the netdevice
> was opened by ndo_open() before performing divide.
>
> Reported-by: Dmitry Vyukov
Am 03.05.2017 15:50, schrieb Colin King:
> From: Colin Ian King
>
> head is previously null checked and so the 2nd null check on head
> is redundant and therefore can be removed.
>
> Detected by CoverityScan, CID#1399505 ("Logically dead code")
>
> Signed-off-by: Colin Ian King
> ---
> net/
Am 29.03.2017 17:54, schrieb Colin King:
> From: Colin Ian King
>
> Ensure we don't end up with a null pointer dereferences by checking
> for for allocation failures. Allocate by sizeof(*ptr) rather than
> the type to fix checkpack warnings. Also merge multiple lines into
> one line for the k
Am 28.03.2017 17:54, schrieb Colin King:
> From: Colin Ian King
>
> Rather than assign the positive errno values to ret and then
> checking if it is positive and flip the sign, just set ret to
> be the -ve errno value.
>
> Detected by CoverityScan, CID#986649 ("Logically Dead Code")
>
> Signe
Am 13.02.2017 14:03, schrieb Timur Tabi:
> walter harms wrote:
>> We have a function where the argument is ignored and the rest is const ?
>>
>> emac_ethtool_get_regs_len seems the only user. So it would be fairly
>> easy to
>> move that into that function.
Am 13.02.2017 12:00, schrieb Dan Carpenter:
> We had intended to say "sizeof(u32)" but the "u" is missing.
> Fortunately, sizeof(32) is also 4, so the original code still works.
>
> Fixes: c4e7beea2192 ("net: qcom/emac: add ethtool support for reading
> hardware registers")
> Signed-off-by: Dan
Am 11.02.2017 00:01, schrieb Ralf Baechle:
> When looking at Thomas' mkiss fix 7ba1b6890387 ("NET: mkiss: Fix panic")
> I noticed that the mkiss SIOCSIFENCAPS ioctl was also doing a slightly
> strange assignment
>
>dev->hard_header_len = AX25_KISS_HEADER_LEN +
>
Am 20.08.2016 08:01, schrieb SF Markus Elfring:
> From: Markus Elfring
> Date: Sat, 20 Aug 2016 07:50:09 +0200
>
> * Reuse existing functionality from memdup_user() instead of keeping
> duplicate source code.
>
> This issue was detected by using the Coccinelle software.
>
> * Return direc
Am 14.07.2016 12:34, schrieb Dan Carpenter:
> There is a 2 byte struct whole after line.loopback so we need to clear
> that out to avoid disclosing stack information.
>
> Fixes: c19b6d246a35 ('drivers/net: support hdlc function for QE-UCC')
> Signed-off-by: Dan Carpenter
>
> diff --git a/drive
this is a case for kmemdup().
target->hwinfo=kmemdup(scan_info,be16_to_cpu(scan_info->size), GFP_KERNEL);
re,
wh
Am 11.04.2016 12:00, schrieb Christophe JAILLET:
> Hi,
>
> while looking at potential clean-up, I ended on the following code which
> looks spurious to me.
>
> We allocate 'be16_
Am 05.04.2016 23:22, schrieb Guillaume Nault:
> On Tue, Apr 05, 2016 at 07:18:14PM +0200, walter harms wrote:
>>
>>
>> Am 05.04.2016 02:56, schrieb Guillaume Nault:
>>> @@ -1043,12 +1048,39 @@ static int ppp_dev_configure(struct net *src_ne
Am 05.04.2016 02:56, schrieb Guillaume Nault:
> Define PPP device handlers for use with rtnetlink.
> The only PPP specific attribute is IFLA_PPP_DEV_FD. It is mandatory and
> contains the file descriptor of the associated /dev/ppp instance (the
> file descriptor which would have been used for ioc
Am 04.03.2016 21:44, schrieb Willem de Bruijn:
> From: Willem de Bruijn
>
> Netdevice parameter hard_header_len is variously interpreted both as
> an upper and lower bound on link layer header length. The field is
> used as upper bound when reserving room at allocation, as lower bound
> when va
Am 23.12.2015 21:04, schrieb Guillaume Nault:
> Define PPP device handler for use with rtnetlink.
>
> The only PPP specific attribute is IFLA_PPP_DEV_FD. It is mandatory and
> contains the file descriptor of the associated /dev/ppp instance (the
> file descriptor which would have been used for i
Am 15.12.2015 14:46, schrieb Manish Chopra:
>> -Original Message-
>> From: dept_hsg_linux_nic_dev-boun...@qlclistserver.qlogic.com
>> [mailto:dept_hsg_linux_nic_dev-boun...@qlclistserver.qlogic.com] On Behalf
>> Of Dan Carpenter
>> Sent: Tuesday, December 15, 2015 3:46 PM
>> To: Dept-GE L
+1
I like this more since it is much more obvious what is done.
more over we can remove a macro with only 2 users.
re,
wh
Am 06.11.2015 11:57, schrieb Julia Lawall:
>>> Would it be preferable to remove the macro entirely and inline the for
>>> loop header?
>>
>> Could you show me an example o
Am 06.06.2015 13:35, schrieb Firo Yang:
> A smatch warning.
> When kmem_cache_alloc() failed to alloc memory, a null pointer
> will be returned. Redeference null pointer will generate
> an unnecessary oops. So, use it after check.
>
> Signed-off-by: Firo Yang
> ---
> net/ipv4/fib_trie.c | 3 ++
Florian Westphal wrote:
> walter harms <[EMAIL PROTECTED]> wrote:
>> These line
>> + strcpy(bcbearer->media.name, "tipc-multicast");
>> i gues that means tipc_bclink_name ?
>
> The idea was to change how things are done, not _what_ is being do
David Miller wrote:
> From: walter harms <[EMAIL PROTECTED]>
> Date: Wed, 01 Nov 2006 22:38:26 +0100
>
>> These line
>> +strcpy(bcbearer->media.name, "tipc-multicast");
>>
>> i gues that means tipc_bclink_name ?
mea culpa, i should not w
hi Florian,
These line
+ strcpy(bcbearer->media.name, "tipc-multicast");
i gues that means tipc_bclink_name ?
an even more secure version could be like this:
strncpy(bcbearer->media.name,sizeof(bcbearer->media.name),tipc_bclink_name);
(in case someone ever changes the size of cb
32 matches
Mail list logo