0, Yejune Deng wrote:
> > Add likely() statements in ipv4_confirm_neigh() for 'rt->rt_gw_family
> > == AF_INET'.
>
> Why? Such macros are beneficial in only specific cases, most of the time,
> likely/unlikely is cargo cult.
>
> >
> > Signed-off-by: Yej
refcount_t type should be used instead of atomic_t when the variable
is used as a reference counter. This is because the implementation of
refcount_t can prevent overflows and detect possible use-after-free.
Signed-off-by: Yejune Deng
---
fs/ceph/mds_client.h | 2 +-
fs/ceph/snap.c | 27
negative_advice handler is only called when dst is non-NULL hence the
'if (rt)' check can be removed. 'if' and 'else if' can be merged together.
And use container_of() instead of (struct rtable *).
Signed-off-by: Yejune Deng
---
net/ipv4/route.c | 16 +
Add likely() statements in ipv4_confirm_neigh() for 'rt->rt_gw_family
== AF_INET'.
Signed-off-by: Yejune Deng
---
net/ipv4/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index fa68c2612252..5762d9bc671c 100644
-
Put if and else if together, and remove unnecessary judgments, because
it's caller can make sure it is true. And add likely() in
ipv4_confirm_neigh().
Signed-off-by: Yejune Deng
---
net/ipv4/route.c | 18 +++---
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/net
proc_creat_seq() that directly take a struct seq_operations,
and deal with network namespaces in ->open.
Signed-off-by: Yejune Deng
---
net/ipv4/route.c | 34 --
1 file changed, 4 insertions(+), 30 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/rout
refcount_t type should be used instead of atomic_t when the variable
is used as a reference counter. This is because the implementation of
refcount_t can prevent overflows and detect possible use-after-free.
Signed-off-by: Yejune Deng
---
include/linux/rmap.h | 7 ---
mm/rmap.c
d-by: kernel test robot
Signed-off-by: Yejune Deng
---
drivers/virt/acrn/irqfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c
index 98d6e9b18f9e..df5184979b28 100644
--- a/drivers/virt/acrn/irqfd.c
+++ b/drivers/virt/acrn
There is no need to assign the msg->msg_name to sin or sin6,
because there is DECLARE_SOCKADDR statement.
Signed-off-by: Yejune Deng
---
net/rds/recv.c | 4
1 file changed, 4 deletions(-)
diff --git a/net/rds/recv.c b/net/rds/recv.c
index aba4afe4dfed..4db109fb6ec2 100644
--- a/net/
get != phys_target. So modify phys target from the current core
to all cpu online.
Signed-off-by: Yejune Deng
---
arch/arm64/kvm/arm.c | 30 +-
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index fc4c95dd2
Thank you. I hadn't thought of that。
On Tue, Mar 2, 2021 at 5:09 PM Christoph Lameter wrote:
>
> On Tue, 2 Mar 2021, Yejune Deng wrote:
>
> > use for() and left shift to calculate the value that compared with size.
>
> There is a reason for the madness...
>
>
use for() and left shift to calculate the value that compared with size.
Signed-off-by: Yejune Deng
---
include/linux/slab.h | 32
1 file changed, 8 insertions(+), 24 deletions(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 7ae604076767
In inet_initpeers(), struct inet_peer on IA32 uses 128 bytes in nowdays.
Get rid of the cascade and use div64_ul() and clamp_val() calculate that
will not need to be adjusted in the future as suggested by Eric Dumazet.
Suggested-by: Eric Dumazet
Signed-off-by: Yejune Deng
---
net/ipv4
Thanks,I will adopt it and resubmit.
On Fri, Feb 26, 2021 at 10:50 PM Eric Dumazet wrote:
>
>
>
> On 2/26/21 11:57 AM, Yejune Deng wrote:
> > In inet_initpeers(), if si.totalram <= (8192*1024)/PAGE_SIZE, it will
> > be judged three times. Use else if instead of if, it
In inet_initpeers(), if si.totalram <= (8192*1024)/PAGE_SIZE, it will
be judged three times. Use else if instead of if, it only needs to be
judged once.
Signed-off-by: Yejune Deng
---
net/ipv4/inetpeer.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/i
In kvm_update_cpuid_runtime(), there is no need the best->function
== 0x7 assignment, because there is e->function == function in
cpuid_entry2_find().
Signed-off-by: Yejune Deng
---
arch/x86/kvm/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/cpu
Thank you for the clarification.
On Tue, Feb 23, 2021 at 12:07 AM David Ahern wrote:
>
> On 2/22/21 1:37 AM, Eric Dumazet wrote:
> >
> >
> > On 2/22/21 4:15 AM, Yejune Deng wrote:
> >> The arp_hh_ops structure is similar to the arp_generic_ops structure.
>
ild/src/consumer/net/core/neighbour.c:1009)
Reported-by: kernel test robot
Signed-off-by: Yejune Deng
---
net/ipv4/arp.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 922dd73e5740..9ee59c2e419a 100644
--- a/net/ipv4/ar
Sorry,it was my fault, I will resubmit.
On Sun, Feb 21, 2021 at 9:54 AM David Ahern wrote:
>
> On 2/19/21 9:32 PM, Yejune Deng wrote:
> > static const struct neigh_ops arp_direct_ops = {
> > .family = AF_INET,
> > .output =
Use vfs_poll() is a more advanced function in acrn_irqfd_assign().
as the same time, modify the definition of events.
Signed-off-by: Yejune Deng
---
drivers/virt/acrn/irqfd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn
OK,I will adopt it and resubmit.
On Sat, Feb 20, 2021 at 5:48 PM Shuo A Liu wrote:
>
> Thanks for the patch.
>
> On Fri 19.Feb'21 at 17:26:12 +0800, Yejune Deng wrote:
> >In acrn_irqfd_assign(), use vfs_poll() is a more advanced function,
> >as the same time, mo
The 'arp_hh_ops' structure is similar to the 'arp_generic_ops' structure.
So remove the 'arp_hh_ops' structure.
Signed-off-by: Yejune Deng
---
net/ipv4/arp.c | 19 +++
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/net/ipv
In acrn_irqfd_assign(), use vfs_poll() is a more advanced function,
as the same time, modify the definition of events.
Signed-off-by: Yejune Deng
---
drivers/virt/acrn/irqfd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn
In fpstate_sanitize_xstate(), use sizeof() instead of a constant,
at the same time, remove & and [0].
Signed-off-by: Yejune Deng
---
arch/x86/kernel/fpu/xstate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xsta
Thank you for your suggestion!
On Wed, Jan 20, 2021 at 6:22 PM Borislav Petkov wrote:
>
> On Wed, Jan 20, 2021 at 02:44:15PM +0800, Yejune Deng wrote:
> > In fpstate_sanitize_xstate(), use memset and offsetof instead of '= 0',
> > and use sizeof instead of a con
ingle(int cpu, void (*func) (void *info),
void *info,
>> kernel/up.c:39:6: error: conflicting types for 'on_each_cpu'
39 | void on_each_cpu(smp_call_func_t func, void *info, int wait)
Reported-by: kernel test robot
Signed-off-by: Yejune Deng
---
include/linux/smp.h
In fpstate_sanitize_xstate(), use memset and offsetof instead of '= 0',
and use sizeof instead of a constant.
Signed-off-by: Yejune Deng
---
arch/x86/kernel/fpu/xstate.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/
In pps_fill_timex(), use memset and offsetof instead of '= 0'.
Signed-off-by: Yejune Deng
---
kernel/time/ntp.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 87389b9e21ab..3416c0381104 100644
--- a/kernel/
In smp_call_function_single() and its caller,the 'wait' variable is only
0 and 1,a bool is a more appropriate definition.
Signed-off-by: Yejune Deng
---
include/linux/smp.h | 10 +-
kernel/smp.c| 8
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git
ble than 'ret'.
Signed-off-by: Yejune Deng
---
arch/arm64/kvm/arm.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 04c44853b103..5fa5c04106de 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -18
slack));
Add fixes that.
Fixes: 36ef65b21930 ("lib: dynamic_queue_limits: use memset and offsetof ")
Reported-by: kernel test robot
Signed-off-by: Yejune Deng
---
lib/dynamic_queue_limits.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_que
Sorry.It failed in ARCH nds32,I will fix it in the next submit.
On Fri, Jan 15, 2021 at 2:33 PM Yejune Deng wrote:
>
> My patch is applied to linux-next/master tree.I also built in arch
> arm64 and x86_64,is OK.Is something wrong with that?
>
> On Fri, Jan 15, 2021 at 12:45 PM ke
> https://github.com/0day-ci/linux/commits/Yejune-Deng/lib-dynamic_queue_limits-use-memset-and-offsetof-init/20210115-112707
> base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> 146620506274bd24d52fb1c589110a30eed8240b
> config: nds32-randconfig-m031-2021011
In dql_reset(), use memset and offsetof instead of '= 0'.
Signed-off-by: Yejune Deng
---
lib/dynamic_queue_limits.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index fde0aa2..21f0745 100644
In bictcp_reset(), use memset and offsetof instead of = 0.
Signed-off-by: Yejune Deng
---
net/ipv4/tcp_cubic.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
index c7bf5b2..ffcbe46 100644
--- a/net/ipv4/tcp_cubic.c
as a little
> concerned that we don't see many users yet of fsleep. Has there been
> pushback on converting "yield" situations from using msleep to fsleep?
>
> On Thu, Dec 10, 2020 at 3:09 AM Yejune Deng wrote:
> >
> > See Documentation/timers/timers-howto.r
There is two function gic_of_init() and gic_of_init_child() called
gic_of_setup(),both gic and node never fail,so remove
if (!gic || !node) is safe.
Signed-off-by: Yejune Deng
---
drivers/irqchip/irq-gic.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers
OK,I will adopt it and resubmit.
On Tue, Dec 29, 2020 at 5:27 PM Marc Zyngier wrote:
>
> Yejune,
>
> On 2020-12-29 07:15, Yejune Deng wrote:
> > There is two function gic_of_init() and gic_of_init_child() called
> > gic_of_setup(),so add WARN_ON() to facilitate backtrac
There is two function gic_of_init() and gic_of_init_child() called
gic_of_setup(),so add WARN_ON() to facilitate backtracking.
Signed-off-by: Yejune Deng
---
drivers/irqchip/irq-gic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip
The function io_remove_personalities() is very similar to
io_unregister_personality(),so implement io_remove_personalities()
calling io_unregister_personality().
Signed-off-by: Yejune Deng
---
fs/io_uring.c | 28 +++-
1 file changed, 11 insertions(+), 17 deletions
OK,I will adopt it and resubmit.
On Wed, Dec 23, 2020 at 8:45 PM Pavel Begunkov wrote:
>
> On 23/12/2020 10:36, Stefano Garzarella wrote:
> > On Wed, Dec 23, 2020 at 11:27:05AM +0800, Yejune Deng wrote:
> >> The function io_remove_personalities() is very similar to
> >
kref_put() can be outside of mutex_lock(),and use amdgpu_ctx_put()
instead of kref_put().
Signed-off-by: Yejune Deng
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
The function io_remove_personalities() is very similar to
io_unregister_personality(),but the latter has a more reasonable
return value.
Signed-off-by: Yejune Deng
---
fs/io_uring.c | 25 ++---
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/fs/io_uring.c b/fs
See Documentation/timers/timers-howto.rst, msleep() is not
for (1ms - 20ms), use usleep_range() instead.
Signed-off-by: Yejune Deng
---
net/core/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index d33099f..c0aa52f 100644
--- a/net
See Documentation/timers/timers-howto.rst, msleep() is not
for (1ms - 20ms),use usleep_range() instead.
Signed-off-by: Yejune Deng
---
init/do_mounts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index a78e44e..e007b47 100644
--- a
Can my submission be accepted ? Do I need to do something, or wait for news?
On Wed, Dec 9, 2020 at 7:11 PM Mark Rutland wrote:
>
> On Wed, Dec 09, 2020 at 11:37:19AM +0100, Peter Zijlstra wrote:
> > On Wed, Dec 09, 2020 at 06:09:01PM +0800, Yejune Deng wrote:
> > > In
Does anyone else have a different opinion? If not,I will adopt it and resubmit.
On Thu, Dec 10, 2020 at 6:19 PM Eric Dumazet wrote:
>
> On Thu, Dec 10, 2020 at 10:35 AM Yejune Deng wrote:
> >
> > See Documentation/timers/timers-howto.rst, msleep() is not
> > for (1ms
See Documentation/timers/timers-howto.rst, msleep() is not
for (1ms - 20ms), There is a more advanced API is used.
Signed-off-by: Yejune Deng
---
net/core/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index d33099f..6e83ee03 100644
See Documentation/timers/timers-howto.rst, msleep() is not
for (1ms - 20ms), There is a more advanced API is used.
Signed-off-by: Yejune Deng
---
fs/cifs/cifsfs.c| 4 ++--
fs/cifs/connect.c | 14 +++---
fs/cifs/file.c | 6 +++---
fs/cifs/smbdirect.c | 2 +-
4 files changed
add '__iomem' for ioremap() and '__user' for copy_to_user().
Signed-off-by: Yejune Deng
---
arch/sh/kernel/crash_dump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sh/kernel/crash_dump.c b/arch/sh/kernel/crash_dump.c
index a908612..5b41b59
a set of atomic_inc_return() looks more neater
Signed-off-by: Yejune Deng
---
drivers/crypto/hisilicon/trng/trng.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/hisilicon/trng/trng.c
b/drivers/crypto/hisilicon/trng/trng.c
index a5033cf..2971268
a set of phy_set_bits() looks more neater
Signed-off-by: Yejune Deng
---
drivers/net/phy/marvell.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 587930a..620052c 100644
--- a/drivers/net/phy
a set of phy_set_bits() looks more neater
Signed-off-by: Yejune Deng
---
drivers/net/phy/marvell.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 587930a..f402e7f 100644
--- a/drivers/net
atomic_inc_return() is a little neater
Signed-off-by: Yejune Deng
---
drivers/infiniband/hw/i40iw/i40iw_cm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c
b/drivers/infiniband/hw/i40iw/i40iw_cm.c
index 3053c345..26e92ae 100644
atomic_inc_return() is a little neater
Signed-off-by: Yejune Deng
---
kernel/audit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index e22f22b..1ffc2e0 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1779,7 +1779,7 @@ unsigned int
devm_reset_control_array_get_exclusive() looks more readable
Signed-off-by: Yejune Deng
---
drivers/soc/amlogic/meson-ee-pwrc.c | 3 +--
drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c
b
devm_reset_control_array_get_exclusive() looks more readable
Signed-off-by: Yejune Deng
---
drivers/phy/amlogic/phy-meson-axg-pcie.c | 2 +-
drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/amlogic/phy-meson
devm_reset_control_array_get_exclusive() looks more readable
Signed-off-by: Yejune Deng
---
drivers/phy/amlogic/phy-meson-axg-pcie.c | 2 +-
drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +-
drivers/soc/amlogic/meson-ee-pwrc.c| 3 +--
drivers/soc/amlogic/meson-gx-pwrc
atomic_inc_return() looks better
Signed-off-by: Yejune Deng
---
net/netfilter/ipvs/ip_vs_core.c | 2 +-
net/netfilter/ipvs/ip_vs_sync.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index c0b8215
atomic_inc_return() looks better
Signed-off-by: Yejune Deng
---
drivers/scsi/pmcraid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index cbe5fab..3e5b70c 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
atomic_inc() and atomic_dec() looks better
Signed-off-by: Yejune Deng
---
drivers/char/ipmi/ipmi_watchdog.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_watchdog.c
b/drivers/char/ipmi/ipmi_watchdog.c
index f78156d..32c334e 100644
--- a
a set of atomic_inc() looks more readable
Signed-off-by: Yejune Deng
---
drivers/net/wireless/st/cw1200/bh.c | 10 +-
drivers/net/wireless/st/cw1200/wsm.c | 8
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/st/cw1200/bh.c
b/drivers/net
of_reset_control_array_get_optional_exclusive() looks more readable
Signed-off-by: Yejune Deng
---
drivers/usb/dwc3/dwc3-of-simple.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-of-simple.c
b/drivers/usb/dwc3/dwc3-of-simple.c
index e62ecd2
devm_reset_control_array_get_exclusive() looks more readable
Signed-off-by: Yejune Deng
---
drivers/phy/amlogic/phy-meson-axg-pcie.c | 2 +-
drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +-
drivers/soc/amlogic/meson-ee-pwrc.c| 3 +--
drivers/soc/amlogic/meson-gx-pwrc
devm_reset_control_array_get_optional_shared() looks more readable
Signed-off-by: Yejune Deng
---
drivers/usb/dwc3/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 841daec..b87acf0 100644
--- a/drivers/usb/dwc3
devm_reset_control_array_get_shared() looks more readable
Signed-off-by: Yejune Deng
---
drivers/clk/renesas/rcar-usb2-clock-sel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/renesas/rcar-usb2-clock-sel.c
b/drivers/clk/renesas/rcar-usb2-clock-sel.c
index
devm_reset_control_array_get_optional_exclusive() looks more readable
Signed-off-by: Yejune Deng
---
drivers/gpu/drm/panfrost/panfrost_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c
b/drivers/gpu/drm/panfrost
Some dts hasn't no reset node, is should ok.
Signed-off-by: Yejune Deng
---
drivers/gpu/drm/panfrost/panfrost_device.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c
b/drivers/gpu/drm/panfrost/panfrost_device.c
68 matches
Mail list logo