Re: [PATCH v2 1/5] mmc: core: change quirks.c to be a header file

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

 



On 2017/2/8 19:15, Ulf Hansson wrote:
[...]

diff --git a/drivers/mmc/core/quirks.c b/drivers/mmc/core/quirks.h
similarity index 95%
rename from drivers/mmc/core/quirks.c
rename to drivers/mmc/core/quirks.h
index bf25a9c..f3bbfcb7 100644
--- a/drivers/mmc/core/quirks.c
+++ b/drivers/mmc/core/quirks.h

As you are rename this to become a header file, please also clean up
the included headers from the new quirks.h.

For example, you don't need these:

#include <linux/kernel.h>
#include <linux/export.h>

Instead you need:
#include <linux/device.h>
#include <linux/string.h>


Sure.


@@ -53,7 +53,8 @@
        END_FIXUP
 };

-void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table)
+static inline void __maybe_unused

The "__maybe_unused" shouldn't be needed here, or is it?


I tried to keep a C file to include quirk.h to make sure it will
be compiled standalone cleanly. Otherwise the gcc cast a warning
with W=1 about "defined but not used"..


+mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table)
 {
        const struct mmc_fixup *f;
        u64 rev = cid_rev_card(card);
@@ -82,4 +83,3 @@ void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table)
                }
        }
 }
-EXPORT_SYMBOL(mmc_fixup_device);

[...]

Kind regards
Uffe





--
Best Regards
Shawn Lin

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux