lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1303167657.4842.40.camel@clockmaker-el6>
Date:	Tue, 19 Apr 2011 09:00:57 +1000
From:	Dave Airlie <airlied@...hat.com>
To:	Ian Romanick <idr@...edesktop.org>
Cc:	Joe Perches <joe@...ches.com>, linux-kernel@...r.kernel.org,
	dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 1/2] drm: Create and use drm_err

On Mon, 2011-04-18 at 15:56 -0700, Ian Romanick wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 04/17/2011 08:35 PM, Joe Perches wrote:
> > Reduce drm text size ~1% by using drm_err and
> > printf extension %pV to emit error messages.
> > 
> > Remove unused macro DRM_MEM_ERROR.
> > 
> > $ size drivers/gpu/drm/built-in.o*
> >    text	   data	    bss	    dec	    hex	filename
> >  361159	   9663	    256	 371078	  5a986	drivers/gpu/drm/built-in.o.new
> >  365416	   9663	    256	 375335	  5ba27	drivers/gpu/drm/built-in.o.old
> > 
> > Signed-off-by: Joe Perches <joe@...ches.com>
> > ---
> >  drivers/gpu/drm/drm_stub.c |   21 +++++++++++++++++++++
> >  include/drm/drmP.h         |   21 +++++++--------------
> >  2 files changed, 28 insertions(+), 14 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
> > index 001273d..6d7b083 100644
> > --- a/drivers/gpu/drm/drm_stub.c
> > +++ b/drivers/gpu/drm/drm_stub.c
> > @@ -62,6 +62,26 @@ struct idr drm_minors_idr;
> >  struct class *drm_class;
> >  struct proc_dir_entry *drm_proc_root;
> >  struct dentry *drm_debugfs_root;
> > +
> > +int drm_err(const char *func, const char *format, ...)
> > +{
> > +	struct va_format vaf;
> > +	va_list args;
> > +	int r;
> > +
> > +	va_start(args, format);
> > +
> > +	vaf.fmt = format;
> > +	vaf.va = &args;
> > +
> > +	r = printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* %pV", func, &vaf);
> 
> This code has ben reorganized a lot over the years, so this comment may
> be bogus.  However...
> 
> I believe that DRM_NAME is a define, and drm_stub.c is in common code.
> As a result, won't this change cause something different to get logged?

No I think we hacked that out a long time past thankfully, so its always
"drm" now.

Dave.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ