Message ID | 1390168117-2925-5-git-send-email-fschaefer.oss@googlemail.com (mailing list archive) |
---|---|
State | Rejected, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1W50Di-0007cA-CL; Sun, 19 Jan 2014 22:47:54 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-6) with esmtp id 1W50Dg-0004Jh-4I; Sun, 19 Jan 2014 22:47:54 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752264AbaASVru (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Sun, 19 Jan 2014 16:47:50 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:50052 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbaASVrr (ORCPT <rfc822;linux-media@vger.kernel.org>); Sun, 19 Jan 2014 16:47:47 -0500 Received: by mail-ee0-f45.google.com with SMTP id b15so3019431eek.4 for <linux-media@vger.kernel.org>; Sun, 19 Jan 2014 13:47:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=kATnNstIhEmdDZyYv/0/4A82FTzSioHpaAwRWFBZ7II=; b=CDU+8bbc+Sry38sLnQu0/Hou8ceScEfxvQMz81nZeye3EZBn8jeQ3GK8qTjdnbtFrj +Qjz81u63aSK7is7Rcvg/Eq3+xWraN7tpiKJLdyCWhN3zfCduSTzuD3UaUVJ9wDlou9/ Uo59Jtx2MJTXFaMDFoF6yVgOCSJL5V5H3Lmh1xbd0GkUtk3dPKqEZKvMxiRBpPPW7vmE 8aTMRb+zRNQxeSiEziUqPWC4/Ts4Jw6Yh/QQ7z//u5UU0jiruOffOGceyZwxNyULNmmz bRxyTzo4UkISUi3Q2ofXjBxsQ+fqUlkQ/J2JQuj0v/vRlx5JfR6RgUsPmpoa3tLc70N4 68NA== X-Received: by 10.14.39.3 with SMTP id c3mr14600508eeb.4.1390168066353; Sun, 19 Jan 2014 13:47:46 -0800 (PST) Received: from Athlon64X2-5000.site (ip-178-201-83-195.unitymediagroup.de. [178.201.83.195]) by mx.google.com with ESMTPSA id j46sm47007878eew.18.2014.01.19.13.47.45 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jan 2014 13:47:45 -0800 (PST) From: =?UTF-8?q?Frank=20Sch=C3=A4fer?= <fschaefer.oss@googlemail.com> To: m.chehab@samsung.com Cc: linux-media@vger.kernel.org, =?UTF-8?q?Frank=20Sch=C3=A4fer?= <fschaefer.oss@googlemail.com> Subject: [PATCH 4/4] em28xx-i2c: remove duplicate error printing code from em28xx_i2c_xfer() Date: Sun, 19 Jan 2014 22:48:37 +0100 Message-Id: <1390168117-2925-5-git-send-email-fschaefer.oss@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1390168117-2925-1-git-send-email-fschaefer.oss@googlemail.com> References: <1390168117-2925-1-git-send-email-fschaefer.oss@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.1.19.213915 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1100_1199 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' |
Commit Message
Frank Schaefer
Jan. 19, 2014, 9:48 p.m. UTC
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
---
drivers/media/usb/em28xx/em28xx-i2c.c | 11 +++--------
1 Datei geändert, 3 Zeilen hinzugefügt(+), 8 Zeilen entfernt(-)
Comments
Em Sun, 19 Jan 2014 22:48:37 +0100 Frank Schäfer <fschaefer.oss@googlemail.com> escreveu: > Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> > --- > drivers/media/usb/em28xx/em28xx-i2c.c | 11 +++-------- > 1 Datei geändert, 3 Zeilen hinzugefügt(+), 8 Zeilen entfernt(-) > > diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c > index a26d7d4..1a514ca 100644 > --- a/drivers/media/usb/em28xx/em28xx-i2c.c > +++ b/drivers/media/usb/em28xx/em28xx-i2c.c > @@ -535,14 +535,9 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap, > * This code is only called during device probe. > */ > rc = i2c_check_for_device(i2c_bus, addr); > - if (rc < 0) { > - if (rc == -ENXIO) { > - if (i2c_debug > 1) > - printk(KERN_CONT " no device\n"); > - } else { > - if (i2c_debug > 1) > - printk(KERN_CONT " ERROR: %i\n", rc); > - } > + if (rc == -ENXIO) { > + if (i2c_debug > 1) > + printk(KERN_CONT " no device\n"); Even if the previous patch were accepted, this one is wrong, as -ENXIO doesn't always mean that there's no device. Also, other return codes may happen here (like -EIO). > rt_mutex_unlock(&dev->i2c_bus_lock); > return rc; > }
Am 04.02.2014 19:50, schrieb Mauro Carvalho Chehab: > Em Sun, 19 Jan 2014 22:48:37 +0100 > Frank Schäfer <fschaefer.oss@googlemail.com> escreveu: > >> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> >> --- >> drivers/media/usb/em28xx/em28xx-i2c.c | 11 +++-------- >> 1 Datei geändert, 3 Zeilen hinzugefügt(+), 8 Zeilen entfernt(-) >> >> diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c >> index a26d7d4..1a514ca 100644 >> --- a/drivers/media/usb/em28xx/em28xx-i2c.c >> +++ b/drivers/media/usb/em28xx/em28xx-i2c.c >> @@ -535,14 +535,9 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap, >> * This code is only called during device probe. >> */ >> rc = i2c_check_for_device(i2c_bus, addr); >> - if (rc < 0) { >> - if (rc == -ENXIO) { >> - if (i2c_debug > 1) >> - printk(KERN_CONT " no device\n"); >> - } else { >> - if (i2c_debug > 1) >> - printk(KERN_CONT " ERROR: %i\n", rc); >> - } >> + if (rc == -ENXIO) { >> + if (i2c_debug > 1) >> + printk(KERN_CONT " no device\n"); > Even if the previous patch were accepted, this one is wrong, as -ENXIO > doesn't always mean that there's no device. Also, other return codes > may happen here (like -EIO). Mauro... please read the patch and the corresponding code again. You will notice that there is absolutely no functional change. The patch just removes duplicate code. Hence your comment makes no sense. If you insist on the weird -ENODEV/-ENXIO inconsistency you've introduced, then of course the patch needs to be rebased. >> rt_mutex_unlock(&dev->i2c_bus_lock); >> return rc; >> } -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c index a26d7d4..1a514ca 100644 --- a/drivers/media/usb/em28xx/em28xx-i2c.c +++ b/drivers/media/usb/em28xx/em28xx-i2c.c @@ -535,14 +535,9 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap, * This code is only called during device probe. */ rc = i2c_check_for_device(i2c_bus, addr); - if (rc < 0) { - if (rc == -ENXIO) { - if (i2c_debug > 1) - printk(KERN_CONT " no device\n"); - } else { - if (i2c_debug > 1) - printk(KERN_CONT " ERROR: %i\n", rc); - } + if (rc == -ENXIO) { + if (i2c_debug > 1) + printk(KERN_CONT " no device\n"); rt_mutex_unlock(&dev->i2c_bus_lock); return rc; }