From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jani Nikula Subject: Re: [PATCH] drm: change drm_err return type to void Date: Tue, 23 Sep 2014 16:00:44 +0300 Message-ID: <87lhpa5w5f.fsf@intel.com> References: <1411403411.2952.36.camel@joe-AO725> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 34B926E0B6 for ; Tue, 23 Sep 2014 06:03:08 -0700 (PDT) In-Reply-To: <1411403411.2952.36.camel@joe-AO725> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Joe Perches , David Airlie Cc: LKML , dri-devel List-Id: dri-devel@lists.freedesktop.org On Mon, 22 Sep 2014, Joe Perches wrote: > The return value is not used by callers of this function > nor by uses of the DRM_ERROR macro so change the function > to return void. > > Signed-off-by: Joe Perches Reviewed-by: Jani Nikula > --- > This change is associated to a desire to eventually > change printk to return void. > > No x86 change in output size for drm_drv.o > > drivers/gpu/drm/drm_drv.c | 7 ++----- > include/drm/drmP.h | 2 +- > 2 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > index 6a11902..8889f8e 100644 > --- a/drivers/gpu/drm/drm_drv.c > +++ b/drivers/gpu/drm/drm_drv.c > @@ -56,22 +56,19 @@ static struct idr drm_minors_idr; > struct class *drm_class; > static struct dentry *drm_debugfs_root; > > -int drm_err(const char *func, const char *format, ...) > +void 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); > + printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* %pV", func, &vaf); > > va_end(args); > - > - return r; > } > EXPORT_SYMBOL(drm_err); > > diff --git a/include/drm/drmP.h b/include/drm/drmP.h > index 5c60d38..2163ccb 100644 > --- a/include/drm/drmP.h > +++ b/include/drm/drmP.h > @@ -124,7 +124,7 @@ extern __printf(2, 3) > void drm_ut_debug_printk(const char *function_name, > const char *format, ...); > extern __printf(2, 3) > -int drm_err(const char *func, const char *format, ...); > +void drm_err(const char *func, const char *format, ...); > > /***********************************************************************/ > /** \name DRM template customization defaults */ > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Jani Nikula, Intel Open Source Technology Center