From patchwork Wed Jul 1 16:53:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 11636933 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B93B260D for ; Wed, 1 Jul 2020 16:54:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C37520771 for ; Wed, 1 Jul 2020 16:54:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593622457; bh=w0LJf58ZHrePxUOhoSEHwkGU11TOzfaBtfencec6dOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jjpWUYl1UOtl12XqQ+ebQfb2b55V57Da8KkHvHnJHBlIkcDF4mBHg/poB6W11VDg/ D8D5q1TODVrpONikNbPAfspnPNO7EWdq79ZLgdrIeqhD1kwuOF6X6xAqTSvtagdK+i QqSedK5LTVaXiorzdccoBF/e5UyYUK1sxVqwG55Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732805AbgGAQyQ (ORCPT ); Wed, 1 Jul 2020 12:54:16 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35053 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732544AbgGAQyN (ORCPT ); Wed, 1 Jul 2020 12:54:13 -0400 Received: by mail-lj1-f194.google.com with SMTP id f8so15720195ljc.2 for ; Wed, 01 Jul 2020 09:54:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XqN5BMTTSq0kRme7uXuwIzqY4FXUwpkC+v2C+TXGWC8=; b=psvx4DkmFIjF94ZCeIbssc8X/FQa02u8MWtgprorfXGUDWXSwKMxumtf2JI0kVYAB9 qfKOZclPOsw5TGkJTA09N/vKxOk/f7crjTY4PhqzlwP6l1b9Pay1jNEDforLM4lIJxBV UwO7fgbkK7mXFSipl0ZqVdxQPyMrZb4scBYI2uTRL/CvmEBwaaXbxUoJccBhcGh8yIMJ 2p3QReqxNk8UpSx48WR7+tjvRvCsI6XbijqzF8tVFpE95SVAnYd8wraJ3aIfiXOTjOcU O9lShgisW8nSBeBy756hu227Ed7Uz8Si0JvEb/UA9YIkBbbe+tjxZHCE+OKcMCB0CJm/ dgZA== X-Gm-Message-State: AOAM533Yyym/BUT3D2WAKlchrGkwou+Cvr7Y/ydfAVQ/vPQkL2bv7i60 rb2Ip9vgF/2iAcn8e+x4c8FYdE9XA04= X-Google-Smtp-Source: ABdhPJxCVFwjbu6xEtiLyxmIbpoeE1K/b5YUK75ublcWu2kLG8Yj0LZJS2t3YJGioXg16NkTMt0xNA== X-Received: by 2002:a2e:161a:: with SMTP id w26mr13906073ljd.216.1593622451281; Wed, 01 Jul 2020 09:54:11 -0700 (PDT) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id 81sm2253295lfj.24.2020.07.01.09.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 09:54:10 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1jqfzq-000425-Ca; Wed, 01 Jul 2020 18:54:06 +0200 From: Johan Hovold To: Johan Hovold Cc: linux-usb@vger.kernel.org Subject: [PATCH 1/5] USB: serial: garmin_gps: don't compile unused packet definitions Date: Wed, 1 Jul 2020 18:53:38 +0200 Message-Id: <20200701165342.15448-2-johan@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701165342.15448-1-johan@kernel.org> References: <20200701165342.15448-1-johan@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Don't compile the four unused packet definitions but keep them around for documentation purposes. This avoids the corresponding W=1 (-Wunused-const-variable) warnings. Signed-off-by: Johan Hovold --- drivers/usb/serial/garmin_gps.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index d63072fee099..c02c19bb1183 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c @@ -179,19 +179,22 @@ static unsigned char const GARMIN_START_SESSION_REPLY[] = { 0, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0 }; static unsigned char const GARMIN_BULK_IN_AVAIL_REPLY[] = { 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 }; +static unsigned char const GARMIN_STOP_TRANSFER_REQ[] + = { 20, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 0, 0 }; +static unsigned char const GARMIN_STOP_TRANSFER_REQ_V2[] + = { 20, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0 }; + +/* packets currently unused, left as documentation */ +#if 0 static unsigned char const GARMIN_APP_LAYER_REPLY[] = { 0x14, 0, 0, 0 }; static unsigned char const GARMIN_START_PVT_REQ[] = { 20, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 49, 0 }; static unsigned char const GARMIN_STOP_PVT_REQ[] = { 20, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 50, 0 }; -static unsigned char const GARMIN_STOP_TRANSFER_REQ[] - = { 20, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 0, 0 }; -static unsigned char const GARMIN_STOP_TRANSFER_REQ_V2[] - = { 20, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0 }; static unsigned char const PRIVATE_REQ[] = { 0x4B, 0x6E, 0x10, 0x01, 0xFF, 0, 0, 0, 0xFF, 0, 0, 0 }; - +#endif static const struct usb_device_id id_table[] = { From patchwork Wed Jul 1 16:53:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 11636937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C02F60D for ; Wed, 1 Jul 2020 16:54:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 525DE20748 for ; Wed, 1 Jul 2020 16:54:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593622460; bh=4r0PxHOHd/gQwRkLkr7zw4bRMnfcYMHJElGpyCEuVLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=02NmrXo9G9qr2BXBsPSUbKjknUx8VKGZq1LVZaOTkDfL5dWLbvPHdEFv2DWK4nxKp hG76GZ7QiBDiCpgxdL8RCU7s1OVpKBi4oW4lxljqZ5mdrALN5QTHEELFj5v1kg0m9Y skb8aoQKpMJbBWcmUsOs6K1AK6s48E10A4R1whk0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732807AbgGAQyQ (ORCPT ); Wed, 1 Jul 2020 12:54:16 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45308 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732739AbgGAQyO (ORCPT ); Wed, 1 Jul 2020 12:54:14 -0400 Received: by mail-lj1-f196.google.com with SMTP id t25so23410419lji.12 for ; Wed, 01 Jul 2020 09:54:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O8+XYERuEbaOaHVA/xOkb+c87xOkSEUM/pBHDX8Fe5c=; b=atvw8v9tvsLyAp9TDRm3X1LrM8XXDRuLwOQiJR4hCwaIjC85eiyLsB6JNj17RR4KG/ Ba2aEtnGT3/gwIhZcm3fzpM0DRClG9i+xjdLFhmCBmr8AyVovG08aHKzCKKdWMnkC0Xa B0CNls5QdyBLC1+lh8zb3MSmI7DRmzftEnADV/05oGNzVdle4UlUKNpMNq9926rJLXcf 4qVwnHM+9Kzksrx8h7Li9VXxwTDqEv98TMCnBXiseKAswgZyaVnqcmGQghblTg0kQDHt xas9zphH3++/qVCObHFL/2iqvkj24rYb4iYEzqQb91bf8pFZ7Y2l67rFvo7PSYtXlys4 fTTw== X-Gm-Message-State: AOAM532GNa6SHPjZ3yCoCTMGU74aPFcpf70Fq9uSs/fPexkM3U3Ydvyd e/g40hsjizoq8BNKooHMv4A= X-Google-Smtp-Source: ABdhPJxkw3CUXK1L6CdQ985miuHN01lOaXDKkKGh6Jr4MnDHiOrbOFVbaUzZpfxLHAA6uqB3YwIk/g== X-Received: by 2002:a2e:8783:: with SMTP id n3mr11600004lji.317.1593622451984; Wed, 01 Jul 2020 09:54:11 -0700 (PDT) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id n3sm1988777ljc.114.2020.07.01.09.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 09:54:10 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1jqfzq-00042A-Fa; Wed, 01 Jul 2020 18:54:06 +0200 From: Johan Hovold To: Johan Hovold Cc: linux-usb@vger.kernel.org Subject: [PATCH 2/5] USB: serial: iuu_phoenix: drop unused URB submission results Date: Wed, 1 Jul 2020 18:53:39 +0200 Message-Id: <20200701165342.15448-3-johan@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701165342.15448-1-johan@kernel.org> References: <20200701165342.15448-1-johan@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The driver is submitting URBs in various completion callbacks without bothering to log errors yet still assigned the return value to temporary variables. Let's drop those temporaries. This suppresses the corresponding W=1 (-Wunused-but-set-variable) warnings. Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index d5bff69b1769..6336616fee49 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c @@ -158,7 +158,6 @@ static int iuu_tiocmget(struct tty_struct *tty) static void iuu_rxcmd(struct urb *urb) { struct usb_serial_port *port = urb->context; - int result; int status = urb->status; if (status) { @@ -174,7 +173,7 @@ static void iuu_rxcmd(struct urb *urb) port->bulk_out_endpointAddress), port->write_urb->transfer_buffer, 1, read_rxcmd_callback, port); - result = usb_submit_urb(port->write_urb, GFP_ATOMIC); + usb_submit_urb(port->write_urb, GFP_ATOMIC); } static int iuu_reset(struct usb_serial_port *port, u8 wt) @@ -241,7 +240,6 @@ static void iuu_update_status_callback(struct urb *urb) static void iuu_status_callback(struct urb *urb) { struct usb_serial_port *port = urb->context; - int result; int status = urb->status; dev_dbg(&port->dev, "%s - status = %d\n", __func__, status); @@ -250,7 +248,7 @@ static void iuu_status_callback(struct urb *urb) port->bulk_in_endpointAddress), port->read_urb->transfer_buffer, 256, iuu_update_status_callback, port); - result = usb_submit_urb(port->read_urb, GFP_ATOMIC); + usb_submit_urb(port->read_urb, GFP_ATOMIC); } static int iuu_status(struct usb_serial_port *port) @@ -351,7 +349,6 @@ static void iuu_rgbf_fill_buffer(u8 *buf, u8 r1, u8 r2, u8 g1, u8 g2, u8 b1, static void iuu_led_activity_on(struct urb *urb) { struct usb_serial_port *port = urb->context; - int result; char *buf_ptr = port->write_urb->transfer_buffer; *buf_ptr++ = IUU_SET_LED; if (xmas) { @@ -366,13 +363,12 @@ static void iuu_led_activity_on(struct urb *urb) port->bulk_out_endpointAddress), port->write_urb->transfer_buffer, 8 , iuu_rxcmd, port); - result = usb_submit_urb(port->write_urb, GFP_ATOMIC); + usb_submit_urb(port->write_urb, GFP_ATOMIC); } static void iuu_led_activity_off(struct urb *urb) { struct usb_serial_port *port = urb->context; - int result; char *buf_ptr = port->write_urb->transfer_buffer; if (xmas) { iuu_rxcmd(urb); @@ -386,7 +382,7 @@ static void iuu_led_activity_off(struct urb *urb) port->bulk_out_endpointAddress), port->write_urb->transfer_buffer, 8 , iuu_rxcmd, port); - result = usb_submit_urb(port->write_urb, GFP_ATOMIC); + usb_submit_urb(port->write_urb, GFP_ATOMIC); } From patchwork Wed Jul 1 16:53:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 11636941 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3E5014E3 for ; Wed, 1 Jul 2020 16:54:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B287A2078B for ; Wed, 1 Jul 2020 16:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593622466; bh=UzI97ARfIgnLa8rQm5vc8ZZvgWuJfR9MSDOgo7XmT6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1vN6OgXtyOYoqIZteCqGLQQu3t2lcTTVKcDwSK6Hv6cirEftaJgHEiz9wW56O0ezp eVtaQ3jGy7Gg8KJkzNZUhRdWodMI7ItAOhjYcM58tXXK4JP8oHsGn1nNCqqoiybSom Np9ArhIu7eBDtPr0PinFav/oXTdSmz/VG6U4TxLE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732526AbgGAQyZ (ORCPT ); Wed, 1 Jul 2020 12:54:25 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:39792 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732800AbgGAQyO (ORCPT ); Wed, 1 Jul 2020 12:54:14 -0400 Received: by mail-lj1-f195.google.com with SMTP id b25so24405663ljp.6 for ; Wed, 01 Jul 2020 09:54:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GsuJHQuVKWW6KYu9kg+y/tvbPJCBGFUHU6+jphg7ArU=; b=FmiFVsn2pyZZDYNrWpmilInyfIS2Ts//uo5wopFGVaci9fQixhNXJin7L5Osd/m8iC MEV+T1PZl8yRXyoj6sCGLvZLHlDxjNNSFornIfOTH+XXBK+dh16s2LGI7IJr9vz1Al0y wHKj6s9uhp9/HioV88gwgTqY7gDuVXMcI6MsY7fpNnKvzfYUuia9GQYORXsHgQOjTL5Q 5sQW7oD0YVHG8rF+6yuQAlKOdDSsCdjsPRyCrrOYTgVjVqVjPlzD0cLEM4R5/sixWO3B IlE2B6kS+JQK+8IO3XIyAj3Ms6v8K+OvDOhT+LOySx3R+u+jB8ZJ6McGTeFrh2BuoXTH hgBw== X-Gm-Message-State: AOAM531TRENJAOLqGdPaFr3/Lu4siCFgUXrHt4w+dddLJF9Xy4wHgDlS ObJ2J+0r1i7G12gCrYzL0oU= X-Google-Smtp-Source: ABdhPJxFHokf46U/QfGYCLpht6ZXHXFufLk3B7BQLx9VbPdpsMU7GtEyE6GrBpEDDifxrnfPAOgTIw== X-Received: by 2002:a2e:a54f:: with SMTP id e15mr15099543ljn.263.1593622452447; Wed, 01 Jul 2020 09:54:12 -0700 (PDT) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id z7sm2014329ljj.33.2020.07.01.09.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 09:54:10 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1jqfzq-00042F-If; Wed, 01 Jul 2020 18:54:06 +0200 From: Johan Hovold To: Johan Hovold Cc: linux-usb@vger.kernel.org Subject: [PATCH 3/5] USB: serial: keyspan_pda: drop unused firmware reset status Date: Wed, 1 Jul 2020 18:53:40 +0200 Message-Id: <20200701165342.15448-4-johan@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701165342.15448-1-johan@kernel.org> References: <20200701165342.15448-1-johan@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Drop the unused firmware reset status which would already have been logged. This suppresses the corresponding W=1 (-Wunused-but-set-variable) warning. Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan_pda.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index bf988f77d400..c1333919716b 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -664,11 +664,10 @@ static void keyspan_pda_close(struct usb_serial_port *port) /* download the firmware to a "fake" device (pre-renumeration) */ static int keyspan_pda_fake_startup(struct usb_serial *serial) { - int response; const char *fw_name; /* download the firmware here ... */ - response = ezusb_fx1_set_reset(serial->dev, 1); + ezusb_fx1_set_reset(serial->dev, 1); if (0) { ; } #ifdef KEYSPAN From patchwork Wed Jul 1 16:53:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 11636939 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B350912 for ; Wed, 1 Jul 2020 16:54:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 328F920771 for ; Wed, 1 Jul 2020 16:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593622466; bh=89Ry5TqCqZN0wM2v3RZhs301xtp7X8+8A7Smn2B1Kcc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=XIYnl8hUHaYNBdYTbKllhLR3mAlkeJLUWs2Y/M2tr8OI1Rji4Q8uv3Te3/p5aLCau nXdc7DGRsmJ9wHBWHAzTqmyFJwUSqJN6ZKa59lxJkFk2Ri/cJT0vS9Yh+U6kzFij3X mLItaLAZs90oqfQcYgBBEGJPurX67vO3j7bQAyjY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732739AbgGAQyY (ORCPT ); Wed, 1 Jul 2020 12:54:24 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:33673 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732803AbgGAQyQ (ORCPT ); Wed, 1 Jul 2020 12:54:16 -0400 Received: by mail-lj1-f195.google.com with SMTP id s1so28013926ljo.0 for ; Wed, 01 Jul 2020 09:54:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Nkm6LZ46gPfDGxsbcgHclCM2WSwIjjjQo9Gbehs+LuA=; b=QaCLauIZqY6qHxV6nB1BrtGbTGpDx5jPvSmiaTC7VMnVHWbrjFU6b8Dc3yCMWAWi4L IeVl9yXamUk9giz0h/Fwu061CVRdZsGx51KPy2i0enePWKW+Ss9BI9cycRfGtxg00MK6 9+DBrknz6f4Hj2SpbppeHmzRsOjnBxxD0/oFVy7NtHM5teQJSOt1Vd5aNiLq6BBBTZIA p+KFsevFPGRY75AWa5pTn/Am7qm099eswx4gVW+rYgHW6jVcX7c3tiX08gExmC+CyRWM xg7rN2QGvObxxkr6AFOjE+uJ6ZQwof/gLbOLiIDtKweE2ncF96tuB9VIaQk+vGNhO+z8 X2sw== X-Gm-Message-State: AOAM532kBnk4eWMlxIxRIuJM0kLz0dMsQiTCf3LfgxpxG6vOWWF6Io1K fdtzF7S6Pc8TNHRxWasn4K0Pm92V1Bg= X-Google-Smtp-Source: ABdhPJxryHcu5UWcJxcKoAmShyWNLcEZDL8v5Fdw2etXzoWOEp2vdOsErdGD2KBdRelDglkT9agDrA== X-Received: by 2002:a2e:390a:: with SMTP id g10mr13057565lja.373.1593622453582; Wed, 01 Jul 2020 09:54:13 -0700 (PDT) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id t15sm2002402lji.49.2020.07.01.09.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 09:54:12 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1jqfzq-00042K-Le; Wed, 01 Jul 2020 18:54:06 +0200 From: Johan Hovold To: Johan Hovold Cc: linux-usb@vger.kernel.org Subject: [PATCH 4/5] USB: serial: kobil_sct: log failure to update line settings Date: Wed, 1 Jul 2020 18:53:41 +0200 Message-Id: <20200701165342.15448-5-johan@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701165342.15448-1-johan@kernel.org> References: <20200701165342.15448-1-johan@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Log failure to update the line settings in set_termios(). This also avoids a W=1 (-Wunused-but-set-variable) warning. Signed-off-by: Johan Hovold --- drivers/usb/serial/kobil_sct.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index e9882ba20933..79ce0219fdde 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -526,6 +526,10 @@ static void kobil_set_termios(struct tty_struct *tty, 0, KOBIL_TIMEOUT ); + if (result) { + dev_err(&port->dev, "failed to update line settings: %d\n", + result); + } } static int kobil_ioctl(struct tty_struct *tty, From patchwork Wed Jul 1 16:53:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 11636935 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3722F60D for ; Wed, 1 Jul 2020 16:54:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12581207C4 for ; Wed, 1 Jul 2020 16:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593622459; bh=gJ8Ou7MGFxvgws/ICcrzy9NSV2FPtMy8qQaCtRfhYSQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VE06vcDugzswb1eSD528loihsSSr5YYdF+k4jdA1hLI4fQbLmfW8UjyaQTVvQlT5C v9ImvM47chOEiOo5a6CYfYF/V61YVysVbd8nuZOSxbwpF5dJo+HhsFlMf54Xu+3XT7 7s817AkoSO9dtJsIErYai7Rr07xLdWmhNpXAyDmw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732581AbgGAQyR (ORCPT ); Wed, 1 Jul 2020 12:54:17 -0400 Received: from mail-lj1-f181.google.com ([209.85.208.181]:44965 "EHLO mail-lj1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732801AbgGAQyP (ORCPT ); Wed, 1 Jul 2020 12:54:15 -0400 Received: by mail-lj1-f181.google.com with SMTP id s9so27948924ljm.11 for ; Wed, 01 Jul 2020 09:54:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gb/RUJ5ZowCAGUAzFbl/YHdM1aI+3dNxCl1/CW0J3uY=; b=c2vx/+XMve1wAy1JK61D6s95QMfLM9J/Htonlmrw4xVwHNufXSwnYOiSayAhoMisdR FXhFuNN449UnX23i7czOwEloiLQHNL8zG8w9fP4oNK2bS6ytU9pR0Uvw7cK/xSvfQS43 HsfN6Pi3iPJbBdUvsBppfgqJtz49FKlY2ccLF1GXvn7Ky5133lncHiP0GuVXV+tnc1B9 pF8ZFpYAvk8iIvXsoc6femkBy+zIdDzqMJT6LDG/e8UKlEiuS6Xn4IoaLk4rdMj+tsPQ Q6DOL6c1aRNHSxiQsiYvGSHtsqQcZxB59wRycNY/yIq1B22MThpPe8zxj22DPV+5XvaU OSug== X-Gm-Message-State: AOAM531nwJj4FrDXrre776mPrRIH/B4i2jFJ2tyaLOAYQAneKLQLIiVF YVh9G5M3zpTYF9IV/WW3FbTVDsN+w1g= X-Google-Smtp-Source: ABdhPJzrTUS5bD7zJmlloW2n79rKnX/+FGzSdag5BU6TAFmUEH+XnV1vRQLmvd+Q2PmGgmdSa+W0mA== X-Received: by 2002:a2e:8699:: with SMTP id l25mr5102838lji.81.1593622453089; Wed, 01 Jul 2020 09:54:13 -0700 (PDT) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id s20sm2225530ljs.36.2020.07.01.09.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 09:54:12 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1jqfzq-00042P-ON; Wed, 01 Jul 2020 18:54:06 +0200 From: Johan Hovold To: Johan Hovold Cc: linux-usb@vger.kernel.org Subject: [PATCH 5/5] USB: serial: quatech2: drop two stub functions Date: Wed, 1 Jul 2020 18:53:42 +0200 Message-Id: <20200701165342.15448-6-johan@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701165342.15448-1-johan@kernel.org> References: <20200701165342.15448-1-johan@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Drop two unused stub functions which only served as documentation. This also avoids a W=1 (-Wunused-but-set-variable) warning. Signed-off-by: Johan Hovold --- drivers/usb/serial/quatech2.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index f93b81a297d6..872d1bc86ab4 100644 --- a/drivers/usb/serial/quatech2.c +++ b/drivers/usb/serial/quatech2.c @@ -480,21 +480,6 @@ static void qt2_process_status(struct usb_serial_port *port, unsigned char *ch) } } -/* not needed, kept to document functionality */ -static void qt2_process_xmit_empty(struct usb_serial_port *port, - unsigned char *ch) -{ - int bytes_written; - - bytes_written = (int)(*ch) + (int)(*(ch + 1) << 4); -} - -/* not needed, kept to document functionality */ -static void qt2_process_flush(struct usb_serial_port *port, unsigned char *ch) -{ - return; -} - static void qt2_process_read_urb(struct urb *urb) { struct usb_serial *serial; @@ -540,7 +525,7 @@ static void qt2_process_read_urb(struct urb *urb) __func__); break; } - qt2_process_xmit_empty(port, ch + 3); + /* bytes_written = (ch[1] << 4) + ch[0]; */ i += 4; escapeflag = true; break; @@ -569,7 +554,6 @@ static void qt2_process_read_urb(struct urb *urb) break; case QT2_REC_FLUSH: case QT2_XMIT_FLUSH: - qt2_process_flush(port, ch + 2); i += 2; escapeflag = true; break;