diff mbox

[01/30] ALSA: dice: suppress checkpatch.pl warnings

Message ID 1417190379-4172-2-git-send-email-o-takashi@sakamocchi.jp (mailing list archive)
State Accepted
Commit 81fc5ad51539e765cd470f1d0d9d0477d1c4c30c
Headers show

Commit Message

Takashi Sakamoto Nov. 28, 2014, 3:59 p.m. UTC
The checkpatch.pl generates some warnings due to:
 - C99 comment
 - a line over 80 characters
 - min() for parameters with different types

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/dice.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/sound/firewire/dice.c b/sound/firewire/dice.c
index e3a04d6..72af110 100644
--- a/sound/firewire/dice.c
+++ b/sound/firewire/dice.c
@@ -133,7 +133,7 @@  static inline u64 global_address(struct dice *dice, unsigned int offset)
 	return DICE_PRIVATE_SPACE + dice->global_offset + offset;
 }
 
-// TODO: rx index
+/* TODO: rx index */
 static inline u64 rx_address(struct dice *dice, unsigned int offset)
 {
 	return DICE_PRIVATE_SPACE + dice->rx_offset + offset;
@@ -721,13 +721,14 @@  static long dice_hwdep_read(struct snd_hwdep *hwdep, char __user *buf,
 		event.lock_status.status = dice->dev_lock_count > 0;
 		dice->dev_lock_changed = false;
 
-		count = min(count, (long)sizeof(event.lock_status));
+		count = min_t(long, count, sizeof(event.lock_status));
 	} else {
-		event.dice_notification.type = SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION;
+		event.dice_notification.type =
+					SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION;
 		event.dice_notification.notification = dice->notification_bits;
 		dice->notification_bits = 0;
 
-		count = min(count, (long)sizeof(event.dice_notification));
+		count = min_t(long, count, sizeof(event.dice_notification));
 	}
 
 	spin_unlock_irq(&dice->lock);