From patchwork Mon Sep 28 16:43:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Rosset X-Patchwork-Id: 50423 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8SGhfU1010299 for ; Mon, 28 Sep 2009 16:43:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752759AbZI1Qng (ORCPT ); Mon, 28 Sep 2009 12:43:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752677AbZI1Qng (ORCPT ); Mon, 28 Sep 2009 12:43:36 -0400 Received: from mail-qy0-f174.google.com ([209.85.221.174]:37163 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751992AbZI1Qnf (ORCPT ); Mon, 28 Sep 2009 12:43:35 -0400 Received: by qyk4 with SMTP id 4so3387595qyk.33 for ; Mon, 28 Sep 2009 09:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id :disposition-notification-to:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=hNjnMMB3ejz2KPeyzwSN5dzr781fmEKnK9xyUwrcbc8=; b=CQOzODZ8rMO9tz0ErXMpIhDpZsMuqyN4SO53ryczIKYSJ1PTc283fdQxjSTW86B8XY u5VzizXeNrN7tzBsZulM75dPUSF8lQDihDzrB/nhOOyOzloyeEeho8GzAn+iLBoo0lBt C2RQXyAEFYVfUqzgAbVsL8ddx22b8PEE/wASo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:disposition-notification-to:date:from:reply-to :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type; b=nNEwRIxaL3Za6jyry7ORb4C/9BcWB5XlJR/05KSG4accgp/R+HMjAPIj6V8TVXbiI3 CrRFp0uldFgoKL5PvWBQMKYJ96gSUR7HFw8ceufxCeV7lZsfrCKQbJFkn9hVLym55PlX n0IwrrUGQDPs9J4p6ZjmeP8ionvKdrPzcBVU8= Received: by 10.224.66.136 with SMTP id n8mr2795700qai.328.1254156218115; Mon, 28 Sep 2009 09:43:38 -0700 (PDT) Received: from ?192.168.1.26? (200-102-97-88.cslce701.dsl.brasiltelecom.net.br [200.102.97.88]) by mx.google.com with ESMTPS id 7sm156308qwf.5.2009.09.28.09.43.35 (version=SSLv3 cipher=RC4-MD5); Mon, 28 Sep 2009 09:43:36 -0700 (PDT) Message-ID: <4AC0E7B0.3010409@gmail.com> Date: Mon, 28 Sep 2009 13:43:28 -0300 From: Filipe Rosset Reply-To: rosset.filipe@gmail.com User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-2.7.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4 MIME-Version: 1.0 To: Devin Heitmueller CC: linux-media@vger.kernel.org, Douglas Schilling Landgraf Subject: Re: [PATCH 2/2] em28xx: Convert printks to em28xx_err and em28xx_info References: <4AC0D05D.4060304@gmail.com> <829197380909280824q487c3effp64914d8430f16092@mail.gmail.com> <4AC0E21F.1000301@gmail.com> <829197380909280923r28452c44j610ffdcccf3f5d38@mail.gmail.com> In-Reply-To: <829197380909280923r28452c44j610ffdcccf3f5d38@mail.gmail.com> X-Enigmail-Version: 0.97a Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Em 28-09-2009 13:23, Devin Heitmueller escreveu: > > Filipe, > > Your updated patch is going to effectively print dev->name twice. > Please look at the definition of em28xx_errdev() and resubmit an > updated patch that takes this into account. > > Thanks, > > Devin > Hi Devin, I now resend correct patch. Sorry for inconvenience. Thanks, Filipe diff -r cbf8899e0fd4 linux/drivers/media/video/em28xx/em28xx-dvb.c --- a/linux/drivers/media/video/em28xx/em28xx-dvb.c Mon Sep 28 11:22:23 2009 -0300 +++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c Mon Sep 28 13:37:46 2009 -0300 @@ -314,22 +314,20 @@ cfg.i2c_addr = addr; if (!dev->dvb->frontend) { - printk(KERN_ERR "%s/2: dvb frontend not attached. " - "Can't attach xc3028\n", - dev->name); + em28xx_errdev("/2: dvb frontend not attached. " + "Can't attach xc3028\n"); return -EINVAL; } fe = dvb_attach(xc2028_attach, dev->dvb->frontend, &cfg); if (!fe) { - printk(KERN_ERR "%s/2: xc3028 attach failed\n", - dev->name); + em28xx_errdev("/2: xc3028 attach failed\n"); dvb_frontend_detach(dev->dvb->frontend); dev->dvb->frontend = NULL; return -EINVAL; } - printk(KERN_INFO "%s/2: xc3028 attached\n", dev->name); + em28xx_info("%s/2: xc3028 attached\n", dev->name); return 0; } @@ -464,7 +462,7 @@ dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); if (dvb == NULL) { - printk(KERN_INFO "em28xx_dvb: memory allocation failed\n"); + em28xx_info("em28xx_dvb: memory allocation failed\n"); return -ENOMEM; } dev->dvb = dvb; @@ -570,15 +568,12 @@ } break; default: - printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" - " isn't supported yet\n", - dev->name); + em28xx_errdev("/2: The frontend of your DVB/ATSC card" + " isn't supported yet\n"); break; } if (NULL == dvb->frontend) { - printk(KERN_ERR - "%s/2: frontend initialization failed\n", - dev->name); + em28xx_errdev("/2: frontend initialization failed\n"); result = -EINVAL; goto out_free; } @@ -592,7 +587,7 @@ goto out_free; em28xx_set_mode(dev, EM28XX_SUSPEND); - printk(KERN_INFO "Successfully loaded em28xx-dvb\n"); + em28xx_info("Successfully loaded em28xx-dvb\n"); return 0; out_free: