Re: [PATCH 1/7] eeprom: at24: don't explicitely include header files which are implicitely included

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2017-11-30 20:32 GMT+01:00 Heiner Kallweit <hkallweit1@xxxxxxxxx>:
> Am 30.11.2017 um 16:56 schrieb Peter Rosin:
>> On 2017-11-30 07:48, Heiner Kallweit wrote:
>>> Don't explicitely include header files which are implicitely included.
>>
>> That's backwards. It hinders future header rearrangement. Things that
>> are used directly (e.g. the BIT macro) should have its respective
>> include specified (bitops.h in that case).
>>
>> It's not a competition for the shortest file, the goal is easy
>> maintenance.
>>
> Understood ..
>
> @Bartosz: then you can ignore this one.
>
> Rgds, Heiner
>
>
>> Cheers,
>> Peter
>>
>>> Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
>>> ---
>>>  drivers/misc/eeprom/at24.c | 5 -----
>>>  1 file changed, 5 deletions(-)
>>>
>>> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
>>> index cd87f1b21..c75bb9b45 100644
>>> --- a/drivers/misc/eeprom/at24.c
>>> +++ b/drivers/misc/eeprom/at24.c
>>> @@ -10,15 +10,10 @@
>>>   * (at your option) any later version.
>>>   */
>>>  #include <linux/kernel.h>
>>> -#include <linux/init.h>
>>>  #include <linux/module.h>
>>>  #include <linux/of_device.h>
>>>  #include <linux/slab.h>
>>>  #include <linux/delay.h>
>>> -#include <linux/mutex.h>
>>> -#include <linux/mod_devicetable.h>
>>> -#include <linux/log2.h>
>>> -#include <linux/bitops.h>
>>>  #include <linux/jiffies.h>
>>>  #include <linux/property.h>
>>>  #include <linux/acpi.h>
>>>
>>
>>
>

Yep, whenever we use anything from some header, we want to have it
included directly. Otherwise any rearrangement would cause us pain.

Thanks,
Bartosz



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux