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

Configure Feed

Select the types of activity you want to include in your feed.

misc: eeprom: eeprom_93cx6: Switch to BIT() macro

Use the BIT() macro rather than (1 << (i - 1)).

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Parker Newman <pnewman@connecttech.com>
Link: https://lore.kernel.org/r/f40d21d284816a62003975e237a58b489d77c7d4.1727880931.git.pnewman@connecttech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Parker Newman and committed by
Greg Kroah-Hartman
d45109c5 7738a7ab

+3 -2
+3 -2
drivers/misc/eeprom/eeprom_93cx6.c
··· 8 8 * Supported chipsets: 93c46 & 93c66. 9 9 */ 10 10 11 + #include <linux/bits.h> 11 12 #include <linux/kernel.h> 12 13 #include <linux/module.h> 13 14 #include <linux/delay.h> ··· 103 102 /* 104 103 * Check if this bit needs to be set. 105 104 */ 106 - eeprom->reg_data_in = !!(data & (1 << (i - 1))); 105 + eeprom->reg_data_in = !!(data & BIT(i - 1)); 107 106 108 107 /* 109 108 * Write the bit to the eeprom register. ··· 153 152 * Read if the bit has been set. 154 153 */ 155 154 if (eeprom->reg_data_out) 156 - buf |= (1 << (i - 1)); 155 + buf |= BIT(i - 1); 157 156 158 157 eeprom_93cx6_pulse_low(eeprom); 159 158 }