staging: mt7621-mmc: Add annotations about held locks
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Tue, 24 Apr 2018 18:01:27 +0000 (20:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 13:36:20 +0000 (15:36 +0200)
The functions msdc_command_resp and msdc_do_request are always called
with the host->lock lock held. By adding annotations, sparse is
informed about that.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/sd.c

index 3f90316b43a6fa5b64b4002e25853e112a1b717f..9476728c925c626decd62dc776f61309cbcf0429 100644 (file)
@@ -950,6 +950,7 @@ static unsigned int msdc_command_resp(struct msdc_host   *host,
                                      struct mmc_command *cmd,
                                      int                 tune,
                                      unsigned long       timeout)
+       __must_hold(&host->lock)
 {
        void __iomem *base = host->base;
        u32 opcode = cmd->opcode;
@@ -1353,6 +1354,7 @@ static void msdc_set_blknum(struct msdc_host *host, u32 blknum)
 }
 
 static int msdc_do_request(struct mmc_host *mmc, struct mmc_request *mrq)
+       __must_hold(&host->lock)
 {
        struct msdc_host *host = mmc_priv(mmc);
        struct mmc_command *cmd;