Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13637
b: refs/heads/master
c: 46998f5
h: refs/heads/master
i:
  13635: 77c398d
v: v3
  • Loading branch information
Yasuyuki Kozakai authored and David S. Miller committed Nov 9, 2005
1 parent 50431c5 commit f602f27
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ca2bdc7a98b9584ac5f640761501405154171c7
refs/heads/master: 46998f59c03ecbd7c2250810f35af6fe24868845
4 changes: 2 additions & 2 deletions trunk/arch/sparc/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct cpu_fp_info linux_sparc_fpu[] = {
{ 9, 3, "Fujitsu or Weitek on-chip FPU"},
};

#define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu)
#define NSPARCFPU (sizeof(linux_sparc_fpu)/sizeof(struct cpu_fp_info))

struct cpu_iu_info linux_sparc_chips[] = {
/* Sun4/100, 4/200, SLC */
Expand Down Expand Up @@ -120,7 +120,7 @@ struct cpu_iu_info linux_sparc_chips[] = {
{ 0xf, 0, "UNKNOWN CPU-VENDOR/TYPE"},
};

#define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips)
#define NSPARCCHIPS (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info))

char *sparc_cpu_type;
char *sparc_fpu_type;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/pcic.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static struct pcic_ca2irq pcic_i_jk[] = {
* as several PROMs may be installed on the same physical board.
*/
#define SN2L_INIT(name, map) \
{ name, map, ARRAY_SIZE(map) }
{ name, map, sizeof(map)/sizeof(struct pcic_ca2irq) }

static struct pcic_sn2list pcic_known_sysnames[] = {
SN2L_INIT("SUNW,JavaEngine1", pcic_i_je1a), /* JE1, PROM 2.32 */
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <asm/kdebug.h>
#include <asm/uaccess.h>

#define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0]))

extern int prom_node_root;

/* At boot time we determine these two values necessary for setting
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sparc64/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct cpu_fp_info linux_sparc_fpu[] = {
{ 0x3e, 0x22, 0, "UltraSparc IIIi+ integrated FPU"},
};

#define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu)
#define NSPARCFPU (sizeof(linux_sparc_fpu)/sizeof(struct cpu_fp_info))

struct cpu_iu_info linux_sparc_chips[] = {
{ 0x17, 0x10, "TI UltraSparc I (SpitFire)"},
Expand All @@ -59,7 +59,7 @@ struct cpu_iu_info linux_sparc_chips[] = {
{ 0x3e, 0x22, "TI UltraSparc IIIi+ (Serrano)"},
};

#define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips)
#define NSPARCCHIPS (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info))

char *sparc_cpu_type = "cpu-oops";
char *sparc_fpu_type = "fpu-oops";
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc64/kernel/ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ COMPATIBLE_IOCTL(FBIOGCURPOS)
COMPATIBLE_IOCTL(FBIOGCURMAX)
/* Little k */
/* Little v, the video4linux ioctls */
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
/* And these ioctls need translation */
/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
HANDLE_IOCTL(FBIOPUTCMAP32, fbiogetputcmap)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc64/kernel/sbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ static unsigned long sysio_irq_offsets[] = {

#undef bogon

#define NUM_SYSIO_OFFSETS ARRAY_SIZE(sysio_irq_offsets)
#define NUM_SYSIO_OFFSETS (sizeof(sysio_irq_offsets) / sizeof(sysio_irq_offsets[0]))

/* Convert Interrupt Mapping register pointer to associated
* Interrupt Clear register pointer, SYSIO specific version.
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include <asm/sections.h>
#include <asm/kdebug.h>

#define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0]))

/*
* To debug kernel to catch accesses to certain virtual/physical addresses.
* Mode = 0 selects physical watchpoints, mode = 1 selects virtual watchpoints.
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/sbus/char/cpwatchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static long wd_compat_ioctl(struct file *file, unsigned int cmd,
case WIOCGSTAT:
lock_kernel();
rval = wd_ioctl(file->f_dentry->d_inode, file, cmd, arg);
unlock_kernel();
lock_kernel();
break;
/* everything else is handled by the generic compat layer */
default:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/sbus/char/display7seg.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
writeb(regs, d7s_regs);
break;
};
unlock_kernel();
lock_kernel();

return error;
}
Expand Down
22 changes: 0 additions & 22 deletions trunk/drivers/sbus/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,27 +210,6 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
}

static long rtc_compat_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
int rval = -ENOIOCTLCMD;

switch (cmd) {
/*
* These two are specific to this driver, the generic rtc ioctls
* are hanlded elsewhere.
*/
case RTCGET:
case RTCSET:
lock_kernel();
rval = rtc_ioctl(file->f_dentry->d_inode, file, cmd, arg);
unlock_kernel();
break;
}

return rval;
}

static int rtc_open(struct inode *inode, struct file *file)
{
int ret;
Expand Down Expand Up @@ -258,7 +237,6 @@ static struct file_operations rtc_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.ioctl = rtc_ioctl,
.compat_ioctl = rtc_compat_ioctl,
.open = rtc_open,
.release = rtc_release,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter/ip_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ ctnetlink_dump_counters(struct sk_buff *skb, const struct ip_conntrack *ct,
{
enum ctattr_type type = dir ? CTA_COUNTERS_REPLY: CTA_COUNTERS_ORIG;
struct nfattr *nest_count = NFA_NEST(skb, type);
u_int64_t tmp;
u_int32_t tmp;

tmp = htonl(ct->counters[dir].packets);
NFA_PUT(skb, CTA_COUNTERS32_PACKETS, sizeof(u_int32_t), &tmp);
Expand Down

0 comments on commit f602f27

Please sign in to comment.