public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Joe Perches <joe@perches.com>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	intel-gvt-dev@lists.freedesktop.org
Cc: Garry Hurley <garry.hurley.jr@gmail.com>,
	kernel-janitors@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()
Date: Tue, 24 Oct 2017 14:51:54 +0000	[thread overview]
Message-ID: <d92e1137-3d4c-8735-ceb4-4664a5803cdf@users.sourceforge.net> (raw)
In-Reply-To: <1508856148.1955.12.camel@perches.com>

>> …  It's just that two out of three error
>> messages happened to be the same and Markus wants to save a bit of
>> memory by using the same string.  The memory savings is not so big that
>> it's worth making the code less readable.
> 
> I agree with Dan.
> 
> It doesn't save any real memory either as the compiler/linker
> reuses the repeated string.

It might depend on passing appropriate parameters.


> It might, depending on the compiler, save a few bytes of
> object code as the compiler may not optimize the repeated
> call away though.

I am trying to show corresponding change possibilities.


> But a good compiler could do that too.

Do you prefer to delegate the proposed software refactoring
only to a corresponding optimiser?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-10-24 14:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 12:25 [PATCH] drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer() SF Markus Elfring
2017-10-24 12:52 ` Jani Nikula
2017-10-24 13:17   ` SF Markus Elfring
2017-10-24 13:54     ` Garry Hurley
2017-10-24 14:26       ` Dan Carpenter
2017-10-24 14:40         ` SF Markus Elfring
2017-10-24 14:42         ` Joe Perches
2017-10-24 14:51           ` SF Markus Elfring [this message]
2017-10-24 14:56             ` Joe Perches
2017-10-24 15:01               ` SF Markus Elfring
2017-10-24 15:14                 ` Daniele Nicolodi
2017-10-24 18:56 ` [PATCH] " Wang, Zhi A

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=d92e1137-3d4c-8735-ceb4-4664a5803cdf@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=garry.hurley.jr@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    /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