Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7111482rwb; Tue, 15 Nov 2022 07:50:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf60mq2VeV6y0ye+uN9ntvSUofcX5reDIkvWZCwvn2JKzP5qz9KOhYj2F6KCl1/Y9cmrDtNR X-Received: by 2002:a17:906:1542:b0:7ae:27ed:e90e with SMTP id c2-20020a170906154200b007ae27ede90emr14168891ejd.224.1668527439081; Tue, 15 Nov 2022 07:50:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668527439; cv=none; d=google.com; s=arc-20160816; b=a6kkh1cbOFofwyEuYeeq0i3CYmjkR7JCQTtrQQVRlRnC2IJTdPHB4yiHC6eMd9kXtV AE5xnV9KgtiJEibovGVL8iu9+houwk6EkOtuvCDbzJ/6OyQrjczet1n63277lwit2cEN ek9lAoxEPAlfO7W9ZCzjmOYBDmEJ9Rmf86hvoXoaDLLBEOoLoDKhYBaznbS+tN4YMdyf NDtTNrzW2ZuKm3nRgZud8oZFyzB5LxAI5K2xkuPmYcFDWeZOFbzEzW71d5JdNYiFGdPf fe5yB7sneFrILHYkl3zUE2qPLNtug4tosm6C7+XdBJ2TBei68vElYrrHlvolWK6pYVdC Oedg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uHMRqOt47L6ujRv/jyT4aFt+Qk8f0ZhiaQpy1RyL+lg=; b=p4NHsfJ/yo7XuYR0fpwaI0/4rh39nqQYTKnZkY4el3QysBWy6JgBptRA6l3k3BcBZZ P7GYQjvcXUvyfMPD4qSXGy+KG7/vKg02aCFGHumWTUT2qaPuYc+bUqFsmiX/8x12tmWC QJ3HHtnRbdiLS5Cv6U+CclY0INMyFOU2DlXGxZswM+Fxh8QgZP+X2965N9uOuM0e7cGB zh4gGxR/XSN/bUrWllgWtPhw/wIM7Ri3+TNvnNQW41Y1bkjTjEdZ5o/nIj+uMnNLbwK2 YzuGvfRdcMhagfkh6H1whbYNYCShtO7B4fVzqOUiWjCFnrY6lQHzlpfnGksfUbCJ8Al2 7zSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="L96/5GX0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz19-20020a1709077d9300b0078ddf8926d2si12593351ejc.827.2022.11.15.07.50.16; Tue, 15 Nov 2022 07:50:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="L96/5GX0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230386AbiKOPlb (ORCPT + 90 others); Tue, 15 Nov 2022 10:41:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238393AbiKOPlR (ORCPT ); Tue, 15 Nov 2022 10:41:17 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 970902C659; Tue, 15 Nov 2022 07:41:16 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id ud5so37053267ejc.4; Tue, 15 Nov 2022 07:41:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uHMRqOt47L6ujRv/jyT4aFt+Qk8f0ZhiaQpy1RyL+lg=; b=L96/5GX0Q2toIyrXZ12bwo7+frDpMical49EPMLddUG6R3/s22JBgdEFELezo4kDoZ gPVcvlVu0jEIpggfS2BxKdp1dE6zmW3kYx4PAOqoYihozXpdusuiY3kL3/yGTo8TjGob ZRDXIMpOxUjvAl0rRCbjY+79HMzUsrrfUw/TFrTBtY0+VOikYn5A2HNMPEu/tKv+9pC+ NxREFuwaH+D2ZfxF1HlohAlBhbEg8Yp7xoEDbUYGfTuG/iokEuIPjrv0oYpIsO6h6IzI KpN7BFAbGJZyhAlLPZUI1p1YkGrF33NtSCf0OXZzEj51LEWR3hY4oarRoDvUa7OyBASB kryA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uHMRqOt47L6ujRv/jyT4aFt+Qk8f0ZhiaQpy1RyL+lg=; b=goZB3GSfYUj1JDqAsd4RQ5QGxJQh8Cr8c9acjYa64M3Hlp2jEvpsxQzC6lxmazizhw 6PAxTfLHuDFPRaJVIDDZ7Tyfk50G8bVd0tcmZ+F0XWiUEgdLuqbSVGMFqmzN8jjVedXA /AoRB2mYB5XIpD7teFlrgevrw0Rvko1HHOyTkVgJm0iRHtRa+sX32Le0f3h8EAMbzSda faXnO0m76QK7twWmfjIL7bCCZ8aiX+iYuI4KYcG0ZZs8oRmvsAOCxW98YsKl/JHLhiZQ sIfEVWOkW/PIeRM6WrqOpobZw4a1nw6exSQf2+1AKBZis050qW2rldCThRz8fxYp9hWc QIqQ== X-Gm-Message-State: ANoB5pmlpgQU90b24sdPgTwYnTb9O8JvItD/05aG+VVzB8DKAo3CyXGv ji+cU7H8wtIodwURy+wyjXBoa2GBXKxR4Hi868Q= X-Received: by 2002:a17:906:e24d:b0:7ad:934f:abc2 with SMTP id gq13-20020a170906e24d00b007ad934fabc2mr13216386ejb.690.1668526875049; Tue, 15 Nov 2022 07:41:15 -0800 (PST) MIME-Version: 1.0 References: <20221115053920.65318-1-jiapeng.chong@linux.alibaba.com> In-Reply-To: <20221115053920.65318-1-jiapeng.chong@linux.alibaba.com> From: Roderick Colenbrander Date: Tue, 15 Nov 2022 07:41:02 -0800 Message-ID: Subject: Re: [PATCH] HID: playstation: remove unreachable code To: Jiapeng Chong Cc: roderick.colenbrander@sony.com, jikos@kernel.org, benjamin.tissoires@redhat.com, rydberg@bitmath.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 14, 2022 at 9:40 PM Jiapeng Chong wrote: > > The function dualshock4_get_calibration_data cannot execute hid_err, > delete the invalid code. > > drivers/hid/hid-playstation.c:1766 dualshock4_get_calibration_data() warn: ignoring unreachable code. > > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3073 > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > drivers/hid/hid-playstation.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/hid/hid-playstation.c b/drivers/hid/hid-playstation.c > index bae3e712a562..a4106f760d1f 100644 > --- a/drivers/hid/hid-playstation.c > +++ b/drivers/hid/hid-playstation.c > @@ -1763,8 +1763,6 @@ static int dualshock4_get_calibration_data(struct dualshock4 *ds4) > ret = -EILSEQ; > goto err_free; > } > - hid_err(hdev, "Failed to retrieve DualShock4 calibration info: %d\n", ret); > - goto err_free; > } else { > break; > } > -- > 2.20.1.7.g153144c > Thanks for pointing this out. The error message is actually needed and should be moved either in the else statement or we just take the else statement. Thanks, Roderick