Skip to content

Commit

Permalink
ipc/compat.c: remove sc_semopm macro
Browse files Browse the repository at this point in the history
This macro appears to have been introduced back in the 2.5 era for
semtimedop32 backward compatibility on ia32:

  https://lkml.org/lkml/2003/4/28/78

Nowadays, this syscall in compat just defaults back to the code found in
sem.c, so it is no longer used and can thus be removed:

long compat_sys_semtimedop(int semid, struct sembuf __user *tsems,
		unsigned nsops, const struct compat_timespec __user *timeout)
{
	struct timespec __user *ts64;
	if (compat_convert_timespec(&ts64, timeout))
		return -EFAULT;
	return sys_semtimedop(semid, tsems, nsops, ts64);
}

Furthermore, there are no users in compat.c.  After this change, kernel
builds just fine with both CONFIG_SYSVIPC_COMPAT and CONFIG_SYSVIPC.

Signed-off-by: Davidlohr Bueso <[email protected]>
Cc: Manfred Spraul <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Davidlohr Bueso authored and torvalds committed Apr 7, 2014
1 parent 6aa7a29 commit 187841a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ipc/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ struct compat_shm_info {
compat_ulong_t swap_attempts, swap_successes;
};

extern int sem_ctls[];
#define sc_semopm (sem_ctls[2])

static inline int compat_ipc_parse_version(int *cmd)
{
#ifdef CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION
Expand Down

0 comments on commit 187841a

Please sign in to comment.