Skip to content

remove duplicate unlikely from IS_ERR

Joe Perches dri-devel kernel-janitors linux-arm-msm linux-ext4 linux-mm linux-nfs linux-s390 linux-scsi linux-wireless lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15drm: Remove duplicate unlikely from IS_ERRdrivers/gpu/drm/ttm/ttm_tt.c+2 -20 replies
2/15stmmac: Remove duplicate unlikely from IS_ERRdrivers/net/stmmac/stmmac_main.c+1 -10 replies
3/15rtc: Remove duplicate unlikely from IS_ERRdrivers/rtc/rtc-bfin.c+1 -12 replies
4/15s390: Remove duplicate unlikely from IS_ERRdrivers/s390/scsi/zfcp_fsf.c+2 -20 replies
5/15osd: Remove duplicate unlikely from IS_ERRdrivers/scsi/osd/osd_initiator.c+1 -10 replies
6/15serial: Remove duplicate unlikely from IS_ERRdrivers/serial/msm_serial.c+1 -11 reply
7/15brcm80211: Remove duplicate unlikely from IS_ERRdrivers/staging/brcm80211/brcmfmac/wl_cfg80211.c+1 -10 replies
8/15gadget: Remove duplicate unlikely from IS_ERRdrivers/usb/gadget/f_fs.c+2 -20 replies
9/15exofs: Remove duplicate unlikely from IS_ERRfs/exofs/super.c+1 -10 replies
10/15ext2: Remove duplicate unlikely from IS_ERRfs/ext2/namei.c+1 -10 replies
11/15ext3: Remove duplicate unlikely from IS_ERRfs/ext3/namei.c+1 -10 replies
12/15ext4: Remove duplicate unlikely from IS_ERRfs/ext4/namei.c+1 -10 replies
13/15nfs: Remove duplicate unlikely from IS_ERRfs/nfs/mount_clnt.c+1 -10 replies
14/15mm: Remove duplicate unlikely from IS_ERRmm/vmalloc.c+1 -10 replies
15/15ipv6: Remove duplicate unlikely from IS_ERRnet/ipv6/af_inet6.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [trivial PATCH 00/15] remove duplicate unlikely from IS_ERR

Tobias Klauser <[email protected]> sent a patch to remove an unnecessary unlikely from drivers/misc/c2port/core.c,
https://lkml.org/lkml/2010/12/9/199

Here are the other instances treewide.

I think it'd be good if people would, when noticing defects in a specific subsystem, look for and correct the same defect treewide.

IS_ERR already has an unlikely test so remove unnecessary unlikelys from the call sites.

from: include/linux/err.h
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) [...]
static inline long __must_check IS_ERR(const void *ptr)

{
	return IS_ERR_VALUE((unsigned long)ptr);
}

Sending directly to maintainers for now, will resend in a month or so only to trivial if not picked up.

Joe Perches (15):
drm: Remove duplicate unlikely from IS_ERR
stmmac: Remove duplicate unlikely from IS_ERR
rtc: Remove duplicate unlikely from IS_ERR
s390: Remove duplicate unlikely from IS_ERR
osd: Remove duplicate unlikely from IS_ERR
serial: Remove duplicate unlikely from IS_ERR
brcm80211: Remove duplicate unlikely from IS_ERR
gadget: Remove duplicate unlikely from IS_ERR
exofs: Remove duplicate unlikely from IS_ERR
ext2: Remove duplicate unlikely from IS_ERR
ext3: Remove duplicate unlikely from IS_ERR
ext4: Remove duplicate unlikely from IS_ERR
nfs: Remove duplicate unlikely from IS_ERR
mm: Remove duplicate unlikely from IS_ERR
ipv6: Remove duplicate unlikely from IS_ERR

 drivers/gpu/drm/ttm/ttm_tt.c                     |    4 ++--
 drivers/net/stmmac/stmmac_main.c                 |    2 +-
 drivers/rtc/rtc-bfin.c                           |    2 +-
 drivers/s390/scsi/zfcp_fsf.c                     |    4 ++--
 drivers/scsi/osd/osd_initiator.c                 |    2 +-
 drivers/serial/msm_serial.c                      |    2 +-
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c |    2 +-
 drivers/usb/gadget/f_fs.c                        |    4 ++--
 fs/exofs/super.c                                 |    2 +-
 fs/ext2/namei.c                                  |    2 +-
 fs/ext3/namei.c                                  |    2 +-
 fs/ext4/namei.c                                  |    2 +-
 fs/nfs/mount_clnt.c                              |    2 +-
 mm/vmalloc.c                                     |    2 +-
 net/ipv6/af_inet6.c                              |    2 +-
 15 files changed, 18 insertions(+), 18 deletions(-)
Signature · 1 line
1.7.3.3.464.gf80b6