LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] OMAPDSS: hdmi5: remove unneeded check
@ 2015-01-13 16:46 Sudip Mukherjee
  2015-01-26 12:41 ` Tomi Valkeinen
  0 siblings, 1 reply; 3+ messages in thread
From: Sudip Mukherjee @ 2015-01-13 16:46 UTC (permalink / raw)
  To: Tomi Valkeinen, Jean-Christophe Plagniol-Villard
  Cc: Sudip Mukherjee, linux-omap, linux-fbdev, linux-kernel

prior to this check we are checking for word_length_16b and if word_length_16b
is false then we are returning with -EINVAL.
So at this point word_length_16b can only be true.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/video/fbdev/omap2/dss/hdmi5_core.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/video/fbdev/omap2/dss/hdmi5_core.c b/drivers/video/fbdev/omap2/dss/hdmi5_core.c
index a3cfe3d..6bf4b75 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi5_core.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi5_core.c
@@ -858,10 +858,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,
 		core_cfg.layout = HDMI_AUDIO_LAYOUT_8CH;
 
 	/* DMA settings */
-	if (word_length_16b)
-		audio_dma.transfer_size = 0x10;
-	else
-		audio_dma.transfer_size = 0x20;
+	audio_dma.transfer_size = 0x10;
 	audio_dma.block_size = 0xC0;
 	audio_dma.mode = HDMI_AUDIO_TRANSF_DMA;
 	audio_dma.fifo_threshold = 0x20; /* in number of samples */
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] OMAPDSS: hdmi5: remove unneeded check
  2015-01-13 16:46 [PATCH] OMAPDSS: hdmi5: remove unneeded check Sudip Mukherjee
@ 2015-01-26 12:41 ` Tomi Valkeinen
  2015-01-27 13:30   ` Sudip Mukherjee
  0 siblings, 1 reply; 3+ messages in thread
From: Tomi Valkeinen @ 2015-01-26 12:41 UTC (permalink / raw)
  To: Sudip Mukherjee, Jean-Christophe Plagniol-Villard
  Cc: linux-omap, linux-fbdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

On 13/01/15 18:46, Sudip Mukherjee wrote:
> prior to this check we are checking for word_length_16b and if word_length_16b
> is false then we are returning with -EINVAL.
> So at this point word_length_16b can only be true.

True, but it looks to me the code may be extended in the future.

And if it would be clear that it won't be extended in the future, then
there's more code changes needed to reflect that (the whole
word_length_16b can be removed, etc).

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] OMAPDSS: hdmi5: remove unneeded check
  2015-01-26 12:41 ` Tomi Valkeinen
@ 2015-01-27 13:30   ` Sudip Mukherjee
  0 siblings, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2015-01-27 13:30 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Jean-Christophe Plagniol-Villard, linux-omap, linux-fbdev, linux-kernel

On Mon, Jan 26, 2015 at 02:41:42PM +0200, Tomi Valkeinen wrote:
> On 13/01/15 18:46, Sudip Mukherjee wrote:
> > prior to this check we are checking for word_length_16b and if word_length_16b
> > is false then we are returning with -EINVAL.
> > So at this point word_length_16b can only be true.
> 
> True, but it looks to me the code may be extended in the future.
> 
> And if it would be clear that it won't be extended in the future, then
> there's more code changes needed to reflect that (the whole
> word_length_16b can be removed, etc).

you are the author of the code, so you will know if it will be extended .. :)

Sudip
> 
>  Tomi
> 
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-27 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-13 16:46 [PATCH] OMAPDSS: hdmi5: remove unneeded check Sudip Mukherjee
2015-01-26 12:41 ` Tomi Valkeinen
2015-01-27 13:30   ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).