public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: t.stanislaws@samsung.com (Tomasz Stanislawski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/4] media: s5p-tv: Replace mxr_ macro by default dev_
Date: Tue, 24 Sep 2013 11:43:53 +0200	[thread overview]
Message-ID: <52415ED9.3030407@samsung.com> (raw)
In-Reply-To: <13162989.WhfDRzW6dg@amdc1032>

Hi,

On 09/23/2013 05:48 PM, Bartlomiej Zolnierkiewicz wrote:
> 
> Hi Tomasz,
> 
> On Monday, September 23, 2013 04:50:01 PM Tomasz Stanislawski wrote:
>> Hello,
>> May I ask what is the rationale for this patch?
>> To reduce a few lines of code?
> 
> This patch makes source code more generic-like and easier to follow (mxd_r*

more generic(-like?) - NOT. Using mxr_ macros is a more generic way to produce logs
because one can change only one line to change error format for the whole module.
For example, in case of mxr_ family, a patch adding function name to debug message
would require just a few lines patch. Using in case of dev_ family, one has to
produce 200-lines of highly conflicting patch.

'easier to follow' - MAYBE. I agree that some people may prefer to
see more directly what is happening, but tell me if you really consider line:

mxr_dbg(mdev, "this is debug\n");

as a very confusing and obfuscated piece of code.

COME ON!

Regards,
TS

> macros currently only obfuscate the code and make them harder to read for
> everybody, maybe besides the original driver author ;). Removal of few
> superfluous lines of code is just a bonus.
> 
>> Or to give up possibility of changing message format in just one place?
> 
> For over two and half year (since s5p-tv driver introduction in Feb 2011)
> such change was not needed and it doesn't seem that keeping the code to
> allow such possibility is worth an added code obfuscation.
> 
> Besides you can easily script a change to message format so in practice
> I don't see a real advantage of keeping non-standard messaging macros
> just for easing a potential message format conversion.
> 
>> I could see migrating from mxr_* to pr_* could seen as the fix, but not this.
> 
> Such migration seems to be pointless as you would have to add an extra
> argument to pr_* to not lose the device information.

There is something called pr_fmt. It may help with mentioned issue.

> 



> Best regards,
> --
> Bartlomiej Zolnierkiewicz
> Samsung R&D Institute Poland
> Samsung Electronics
> 
>> Waiting for reply,
>> Tomasz Stanislawski
>>
>>
>> On 09/21/2013 05:00 PM, Mateusz Krawczuk wrote:
>>> Replace mxr_dbg, mxr_info and mxr_warn by generic solution.
>>>
>>> Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
>>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>>> ---
>>>  drivers/media/platform/s5p-tv/mixer.h           |  12 ---
>>>  drivers/media/platform/s5p-tv/mixer_drv.c       |  47 ++++++-----
>>>  drivers/media/platform/s5p-tv/mixer_grp_layer.c |   2 +-
>>>  drivers/media/platform/s5p-tv/mixer_reg.c       |   6 +-
>>>  drivers/media/platform/s5p-tv/mixer_video.c     | 100 ++++++++++++------------
>>>  drivers/media/platform/s5p-tv/mixer_vp_layer.c  |   2 +-
>>>  6 files changed, 78 insertions(+), 91 deletions(-)
>>>

  parent reply	other threads:[~2013-09-24  9:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21 15:00 [PATCH v5 0/4] media: s5p-tv: clean-up and fixes Mateusz Krawczuk
2013-09-21 15:00 ` [PATCH v5 1/4] media: s5p-tv: Replace mxr_ macro by default dev_ Mateusz Krawczuk
2013-09-23 14:50   ` Tomasz Stanislawski
2013-09-23 15:48     ` Bartlomiej Zolnierkiewicz
2013-09-23 17:44       ` Joe Perches
2013-09-24 12:52         ` Tomasz Stanislawski
2013-09-24 15:35           ` Bartlomiej Zolnierkiewicz
2013-09-24 16:24           ` Joe Perches
2013-09-24  9:43       ` Tomasz Stanislawski [this message]
2013-09-24 10:33         ` Bartlomiej Zolnierkiewicz
2013-09-24 13:02           ` Mauro Carvalho Chehab
2013-09-21 15:00 ` [PATCH v5 2/4] media: s5p-tv: Restore vpll clock rate Mateusz Krawczuk
2013-09-25 15:46   ` Tomasz Stanislawski
2013-10-12 10:06     ` Sylwester Nawrocki
2013-09-21 15:00 ` [PATCH v5 3/4] media: s5p-tv: Fix sdo driver to work with CCF Mateusz Krawczuk
2013-09-25 15:59   ` Tomasz Stanislawski
2013-10-12 10:25     ` Sylwester Nawrocki
2013-09-21 15:00 ` [PATCH v5 4/4] media: s5p-tv: Fix mixer " Mateusz Krawczuk
2013-09-23 12:44   ` Sylwester Nawrocki
2013-09-25 16:10     ` Tomasz Stanislawski
2013-09-25 16:09   ` Tomasz Stanislawski
2013-10-12 10:27     ` Sylwester Nawrocki
2013-09-23  3:52 ` [PATCH v5 0/4] media: s5p-tv: clean-up and fixes Sachin Kamat
2013-09-23 12:26 ` Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52415ED9.3030407@samsung.com \
    --to=t.stanislaws@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox