Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

m68k: atari: Rename shifter to shifter_st to avoid conflict

When test-compiling the BCM2835 pin control driver on m68k:

In file included from arch/m68k/include/asm/io_mm.h:32:0,
from arch/m68k/include/asm/io.h:8,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/linux/gpio/driver.h:7,
from drivers/pinctrl/bcm/pinctrl-bcm2835.c:17:
drivers/pinctrl/bcm/pinctrl-bcm2835.c: In function 'bcm2711_pull_config_set':
arch/m68k/include/asm/atarihw.h:190:22: error: expected identifier or '(' before 'volatile'
# define shifter ((*(volatile struct SHIFTER *)SHF_BAS))

"shifter" is a too generic name for a global definition.

As the corresponding definition for Atari TT is already called
"shifter_tt", fix this by renaming the definition for Atari ST to
"shifter_st".

Reported-by: kbuild test robot <lkp@intel.com>
Suggested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

+26 -26
+3 -3
arch/m68k/atari/config.c
··· 246 246 } else if (hwreg_present(tt_palette)) { 247 247 ATARIHW_SET(TT_SHIFTER); 248 248 pr_cont(" TT_SHIFTER"); 249 - } else if (hwreg_present(&shifter.bas_hi)) { 250 - if (hwreg_present(&shifter.bas_lo) && 251 - (shifter.bas_lo = 0x0aau, shifter.bas_lo == 0x0aau)) { 249 + } else if (hwreg_present(&shifter_st.bas_hi)) { 250 + if (hwreg_present(&shifter_st.bas_lo) && 251 + (shifter_st.bas_lo = 0x0aau, shifter_st.bas_lo == 0x0aau)) { 252 252 ATARIHW_SET(EXTD_SHIFTER); 253 253 pr_cont(" EXTD_SHIFTER"); 254 254 } else {
+2 -2
arch/m68k/include/asm/atarihw.h
··· 161 161 #define TT_HIGH 6 162 162 163 163 #define SHF_BAS (0xffff8200) 164 - struct SHIFTER 164 + struct SHIFTER_ST 165 165 { 166 166 u_char pad1; 167 167 u_char bas_hi; ··· 178 178 u_char pad7; 179 179 u_char bas_lo; 180 180 }; 181 - # define shifter ((*(volatile struct SHIFTER *)SHF_BAS)) 181 + # define shifter_st ((*(volatile struct SHIFTER_ST *)SHF_BAS)) 182 182 183 183 #define SHF_FBAS (0xffff820e) 184 184 struct SHIFTER_F030
+21 -21
drivers/video/fbdev/atafb.c
··· 763 763 { 764 764 unsigned long addr; 765 765 par->hw.tt.mode = shifter_tt.tt_shiftmode; 766 - par->hw.tt.sync = shifter.syncmode; 767 - addr = ((shifter.bas_hi & 0xff) << 16) | 768 - ((shifter.bas_md & 0xff) << 8) | 769 - ((shifter.bas_lo & 0xff)); 766 + par->hw.tt.sync = shifter_st.syncmode; 767 + addr = ((shifter_st.bas_hi & 0xff) << 16) | 768 + ((shifter_st.bas_md & 0xff) << 8) | 769 + ((shifter_st.bas_lo & 0xff)); 770 770 par->screen_base = atari_stram_to_virt(addr); 771 771 } 772 772 773 773 static void tt_set_par(struct atafb_par *par) 774 774 { 775 775 shifter_tt.tt_shiftmode = par->hw.tt.mode; 776 - shifter.syncmode = par->hw.tt.sync; 776 + shifter_st.syncmode = par->hw.tt.sync; 777 777 /* only set screen_base if really necessary */ 778 778 if (current_par.screen_base != par->screen_base) 779 779 fbhw->set_screen_base(par->screen_base); ··· 1543 1543 hw->f_shift = videl.f_shift; 1544 1544 hw->vid_control = videl.control; 1545 1545 hw->vid_mode = videl.mode; 1546 - hw->sync = shifter.syncmode & 0x1; 1546 + hw->sync = shifter_st.syncmode & 0x1; 1547 1547 hw->xoffset = videl.xoffset & 0xf; 1548 1548 hw->hht = videl.hht; 1549 1549 hw->hbb = videl.hbb; ··· 1558 1558 hw->vde = videl.vde; 1559 1559 hw->vss = videl.vss; 1560 1560 1561 - addr = (shifter.bas_hi & 0xff) << 16 | 1562 - (shifter.bas_md & 0xff) << 8 | 1563 - (shifter.bas_lo & 0xff); 1561 + addr = (shifter_st.bas_hi & 0xff) << 16 | 1562 + (shifter_st.bas_md & 0xff) << 8 | 1563 + (shifter_st.bas_lo & 0xff); 1564 1564 par->screen_base = atari_stram_to_virt(addr); 1565 1565 1566 1566 /* derived parameters */ ··· 1605 1605 /* Turn off external clocks. Read sets all output bits to 1. */ 1606 1606 *(volatile unsigned short *)0xffff9202; 1607 1607 } 1608 - shifter.syncmode = hw->sync; 1608 + shifter_st.syncmode = hw->sync; 1609 1609 1610 1610 videl.hht = hw->hht; 1611 1611 videl.hbb = hw->hbb; ··· 1952 1952 { 1953 1953 unsigned long addr; 1954 1954 par->hw.st.mode = shifter_tt.st_shiftmode; 1955 - par->hw.st.sync = shifter.syncmode; 1956 - addr = ((shifter.bas_hi & 0xff) << 16) | 1957 - ((shifter.bas_md & 0xff) << 8); 1955 + par->hw.st.sync = shifter_st.syncmode; 1956 + addr = ((shifter_st.bas_hi & 0xff) << 16) | 1957 + ((shifter_st.bas_md & 0xff) << 8); 1958 1958 if (ATARIHW_PRESENT(EXTD_SHIFTER)) 1959 - addr |= (shifter.bas_lo & 0xff); 1959 + addr |= (shifter_st.bas_lo & 0xff); 1960 1960 par->screen_base = atari_stram_to_virt(addr); 1961 1961 } 1962 1962 1963 1963 static void stste_set_par(struct atafb_par *par) 1964 1964 { 1965 1965 shifter_tt.st_shiftmode = par->hw.st.mode; 1966 - shifter.syncmode = par->hw.st.sync; 1966 + shifter_st.syncmode = par->hw.st.sync; 1967 1967 /* only set screen_base if really necessary */ 1968 1968 if (current_par.screen_base != par->screen_base) 1969 1969 fbhw->set_screen_base(par->screen_base); ··· 2018 2018 unsigned long addr; 2019 2019 addr = atari_stram_to_phys(s_base); 2020 2020 /* Setup Screen Memory */ 2021 - shifter.bas_hi = (unsigned char)((addr & 0xff0000) >> 16); 2022 - shifter.bas_md = (unsigned char)((addr & 0x00ff00) >> 8); 2021 + shifter_st.bas_hi = (unsigned char)((addr & 0xff0000) >> 16); 2022 + shifter_st.bas_md = (unsigned char)((addr & 0x00ff00) >> 8); 2023 2023 if (ATARIHW_PRESENT(EXTD_SHIFTER)) 2024 - shifter.bas_lo = (unsigned char)(addr & 0x0000ff); 2024 + shifter_st.bas_lo = (unsigned char)(addr & 0x0000ff); 2025 2025 } 2026 2026 2027 2027 #endif /* ATAFB_STE */ ··· 2265 2265 2266 2266 addr = atari_stram_to_phys(s_base); 2267 2267 /* Setup Screen Memory */ 2268 - shifter.bas_hi = (unsigned char)((addr & 0xff0000) >> 16); 2269 - shifter.bas_md = (unsigned char)((addr & 0x00ff00) >> 8); 2270 - shifter.bas_lo = (unsigned char)(addr & 0x0000ff); 2268 + shifter_st.bas_hi = (unsigned char)((addr & 0xff0000) >> 16); 2269 + shifter_st.bas_md = (unsigned char)((addr & 0x00ff00) >> 8); 2270 + shifter_st.bas_lo = (unsigned char)(addr & 0x0000ff); 2271 2271 } 2272 2272 2273 2273 static int pan_display(struct fb_var_screeninfo *var, struct fb_info *info)