Skip to content

Commit

Permalink
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-…
Browse files Browse the repository at this point in the history
…linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: IP32: Remove unnecessary if not even harmful volatile keywords.
  MIPS: IP32: Fix build error due to uninitialized variable.
  MIPS: Fix sparse warning in incompatiable argument type of clear_user.
  • Loading branch information
Linus Torvalds committed May 22, 2009
2 parents 1e787d1 + d2f82c2 commit afc2788
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/mips/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ __clear_user(void __user *addr, __kernel_size_t size)
void __user * __cl_addr = (addr); \
unsigned long __cl_size = (n); \
if (__cl_size && access_ok(VERIFY_WRITE, \
((unsigned long)(__cl_addr)), __cl_size)) \
__cl_addr, __cl_size)) \
__cl_size = __clear_user(__cl_addr, __cl_size); \
__cl_size; \
})
Expand Down
7 changes: 4 additions & 3 deletions arch/mips/sgi-ip32/ip32-reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static inline void ip32_machine_halt(void)

static void ip32_machine_power_off(void)
{
volatile unsigned char reg_a, xctrl_a, xctrl_b;
unsigned char reg_a, xctrl_a, xctrl_b;

disable_irq(MACEISA_RTC_IRQ);
reg_a = CMOS_READ(RTC_REG_A);
Expand Down Expand Up @@ -91,9 +91,10 @@ static void blink_timeout(unsigned long data)

static void debounce(unsigned long data)
{
volatile unsigned char reg_a, reg_c, xctrl_a;
unsigned char reg_a, reg_c, xctrl_a;

reg_c = CMOS_READ(RTC_INTR_FLAGS);
reg_a = CMOS_READ(RTC_REG_A);
CMOS_WRITE(reg_a | DS_REGA_DV0, RTC_REG_A);
wbflush();
xctrl_a = CMOS_READ(DS_B1_XCTRL4A);
Expand Down Expand Up @@ -137,7 +138,7 @@ static inline void ip32_power_button(void)

static irqreturn_t ip32_rtc_int(int irq, void *dev_id)
{
volatile unsigned char reg_c;
unsigned char reg_c;

reg_c = CMOS_READ(RTC_INTR_FLAGS);
if (!(reg_c & RTC_IRQF)) {
Expand Down

0 comments on commit afc2788

Please sign in to comment.