From patchwork Sun Oct 12 10:03:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 5070371 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 49326C11AC for ; Sun, 12 Oct 2014 10:03:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DE8E20125 for ; Sun, 12 Oct 2014 10:03:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5905820145 for ; Sun, 12 Oct 2014 10:03:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751209AbaJLKDw (ORCPT ); Sun, 12 Oct 2014 06:03:52 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:57522 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751107AbaJLKDw (ORCPT ); Sun, 12 Oct 2014 06:03:52 -0400 Received: by mail-la0-f46.google.com with SMTP id gi9so5343505lab.19 for ; Sun, 12 Oct 2014 03:03:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=zBAhkTLUFXCLeVTaUxpbNSfjBUitZyrJ35vOUOE7RHg=; b=OnQGyzxjemVuJtwPSamOruDqpb5y5E1ix0vQcV2T9GLEFXVYu9PMmeyJZjVJeF9iIj bPTaqbcX1p7uz6gA23mshngQjTagQedaM/iYiSDGM09qEwMZOfeTIov3iWdFYf3D988A LlWXZNU7SROdDCzfnkS5cHaVQYhCsdmeOyQ2Q+7xW6OfCO+yMIRYQCzPFo3k2VE2zCTD pQ3AUELuZ5+9HiKUtwO68PZ9iBK0qKqVXWaNAbzVLwoQZPEsX6Mn9gOrB4sEdNtot3KV 3AIZTMZKvRTl2ihDmJH0kcZ0s9oc77CZL6ErEeHHRGjtY1oIOzQm9plkvxhtM3RPOibG BQhQ== X-Gm-Message-State: ALoCoQmpBNI5CbfxL6x9l5u00SF58QyUPYpIYMslkGRTuBp1OsOqHgonszmLxKy5hrqMDnn3waCJ X-Received: by 10.152.43.201 with SMTP id y9mr16951412lal.54.1413108230816; Sun, 12 Oct 2014 03:03:50 -0700 (PDT) Received: from olli-desktop.lan (87-93-228-250.bb.dnainternet.fi. [87.93.228.250]) by mx.google.com with ESMTPSA id m1sm3475276lbt.22.2014.10.12.03.03.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Oct 2014 03:03:50 -0700 (PDT) From: Olli Salonen To: linux-media@vger.kernel.org Cc: nibble.max@gmail.com, Olli Salonen Subject: [PATCH 3/4] dvbsky: clean logging Date: Sun, 12 Oct 2014 13:03:10 +0300 Message-Id: <1413108191-32510-3-git-send-email-olli.salonen@iki.fi> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413108191-32510-1-git-send-email-olli.salonen@iki.fi> References: <1413108191-32510-1-git-send-email-olli.salonen@iki.fi> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP dev_err includes the function name in the log printout, so there is no need to include it manually. While here, fix a small grammatical error in the i2c error message. Signed-off-by: Olli Salonen --- drivers/media/usb/dvb-usb-v2/dvbsky.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c index fabe3f5..5c7387a 100644 --- a/drivers/media/usb/dvb-usb-v2/dvbsky.c +++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c @@ -101,8 +101,7 @@ static int dvbsky_gpio_ctrl(struct dvb_usb_device *d, u8 gport, u8 value) obuf[2] = value; ret = dvbsky_usb_generic_rw(d, obuf, 3, ibuf, 1); if (ret) - dev_err(&d->udev->dev, "%s: %s() failed=%d\n", - KBUILD_MODNAME, __func__, ret); + dev_err(&d->udev->dev, "failed=%d\n", ret); return ret; } @@ -119,7 +118,7 @@ static int dvbsky_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], if (num > 2) { dev_err(&d->udev->dev, - "dvbsky_usb: too many i2c messages[%d] than 2.", num); + "too many i2c messages[%d], max 2.", num); ret = -EOPNOTSUPP; goto i2c_error; } @@ -127,7 +126,7 @@ static int dvbsky_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], if (num == 1) { if (msg[0].len > 60) { dev_err(&d->udev->dev, - "dvbsky_usb: too many i2c bytes[%d] than 60.", + "too many i2c bytes[%d], max 60.", msg[0].len); ret = -EOPNOTSUPP; goto i2c_error; @@ -141,8 +140,7 @@ static int dvbsky_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret = dvbsky_usb_generic_rw(d, obuf, 4, ibuf, msg[0].len + 1); if (ret) - dev_err(&d->udev->dev, "%s: %s() failed=%d\n", - KBUILD_MODNAME, __func__, ret); + dev_err(&d->udev->dev, "failed=%d\n", ret); if (!ret) memcpy(msg[0].buf, &ibuf[1], msg[0].len); } else { @@ -154,13 +152,12 @@ static int dvbsky_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret = dvbsky_usb_generic_rw(d, obuf, msg[0].len + 3, ibuf, 1); if (ret) - dev_err(&d->udev->dev, "%s: %s() failed=%d\n", - KBUILD_MODNAME, __func__, ret); + dev_err(&d->udev->dev, "failed=%d\n", ret); } } else { if ((msg[0].len > 60) || (msg[1].len > 60)) { dev_err(&d->udev->dev, - "dvbsky_usb: too many i2c bytes[w-%d][r-%d] than 60.", + "too many i2c bytes[w-%d][r-%d], max 60.", msg[0].len, msg[1].len); ret = -EOPNOTSUPP; goto i2c_error; @@ -174,8 +171,7 @@ static int dvbsky_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret = dvbsky_usb_generic_rw(d, obuf, msg[0].len + 4, ibuf, msg[1].len + 1); if (ret) - dev_err(&d->udev->dev, "%s: %s() failed=%d\n", - KBUILD_MODNAME, __func__, ret); + dev_err(&d->udev->dev, "failed=%d\n", ret); if (!ret) memcpy(msg[1].buf, &ibuf[1], msg[1].len); @@ -206,8 +202,7 @@ static int dvbsky_rc_query(struct dvb_usb_device *d) obuf[0] = 0x10; ret = dvbsky_usb_generic_rw(d, obuf, 1, ibuf, 2); if (ret) - dev_err(&d->udev->dev, "%s: %s() failed=%d\n", - KBUILD_MODNAME, __func__, ret); + dev_err(&d->udev->dev, "failed=%d\n", ret); if (ret == 0) code = (ibuf[0] << 8) | ibuf[1]; if (code != 0xffff) {