[PATCH 6/8] staging: mt7621-mmc: Add annotations about held locks

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

 



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@xxxxxxxx>
Reviewed-by: NeilBrown <neil@xxxxxxxxx>
---
 drivers/staging/mt7621-mmc/sd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 3f90316b43a6..9476728c925c 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -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;
-- 
2.16.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux