From patchwork Sat Oct 27 20:40:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1656601 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 14BFDDFAC4 for ; Sat, 27 Oct 2012 20:43:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757983Ab2J0Unb (ORCPT ); Sat, 27 Oct 2012 16:43:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6776 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326Ab2J0UmR (ORCPT ); Sat, 27 Oct 2012 16:42:17 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9RKgHQa019829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 27 Oct 2012 16:42:17 -0400 Received: from pedra (vpn1-4-98.gru2.redhat.com [10.97.4.98]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9RKgDfV002364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 27 Oct 2012 16:42:16 -0400 Received: from v4l by pedra with local (Exim 4.76) (envelope-from ) id 1TSDCG-0007bE-FN; Sat, 27 Oct 2012 18:41:32 -0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Hans de Goede Subject: [PATCH 38/68] [media] jeilinj: fix return of the response code Date: Sat, 27 Oct 2012 18:40:56 -0200 Message-Id: <1351370486-29040-39-git-send-email-mchehab@redhat.com> In-Reply-To: <1351370486-29040-1-git-send-email-mchehab@redhat.com> References: <1351370486-29040-1-git-send-email-mchehab@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org drivers/media/usb/gspca/jeilinj.c: In function 'jlj_read1': drivers/media/usb/gspca/jeilinj.c:117:66: warning: parameter 'response' set but not used [-Wunused-but-set-parameter] The code still doesn't make much sense, as response is never tested there. Cc: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/gspca/jeilinj.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/jeilinj.c b/drivers/media/usb/gspca/jeilinj.c index b897aa8..1ba29fe 100644 --- a/drivers/media/usb/gspca/jeilinj.c +++ b/drivers/media/usb/gspca/jeilinj.c @@ -114,7 +114,7 @@ static void jlj_write2(struct gspca_dev *gspca_dev, unsigned char *command) } /* Responses are one byte only */ -static void jlj_read1(struct gspca_dev *gspca_dev, unsigned char response) +static void jlj_read1(struct gspca_dev *gspca_dev, unsigned char *response) { int retval; @@ -123,7 +123,7 @@ static void jlj_read1(struct gspca_dev *gspca_dev, unsigned char response) retval = usb_bulk_msg(gspca_dev->dev, usb_rcvbulkpipe(gspca_dev->dev, 0x84), gspca_dev->usb_buf, 1, NULL, 500); - response = gspca_dev->usb_buf[0]; + *response = gspca_dev->usb_buf[0]; if (retval < 0) { pr_err("read command [%02x] error %d\n", gspca_dev->usb_buf[0], retval); @@ -260,7 +260,7 @@ static int jlj_start(struct gspca_dev *gspca_dev) if (start_commands[i].delay) msleep(start_commands[i].delay); if (start_commands[i].ack_wanted) - jlj_read1(gspca_dev, response); + jlj_read1(gspca_dev, &response); } setcamquality(gspca_dev, v4l2_ctrl_g_ctrl(sd->jpegqual)); msleep(2);