Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3244527rwr; Sat, 29 Apr 2023 03:46:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GVZ2tGXpkCnU6ZqfqiYpoMyi7qKYY2koa+KXR0bJzuWuv0+Z0TtpwWxJUjVT7yOszW6CQ X-Received: by 2002:a05:6a20:3d85:b0:f6:d60d:dbfc with SMTP id s5-20020a056a203d8500b000f6d60ddbfcmr7442963pzi.5.1682765183960; Sat, 29 Apr 2023 03:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682765183; cv=none; d=google.com; s=arc-20160816; b=NFOzvYg+kgaiXQGkAFnX1W+2DaW9iu5Y9MmM9Zb73eYmBiI7UlhZeYuwxheGG5HmsE cFVzyNIAhudVXamKwPb8TQ5ifyRxNr6MZrgquaOkNNCbHBfCz0Lxtx2yaZOQlKzERsXL 67uBQMaFL5UtPDVOv1xIHeJXScPmOZOFOh8qmNhBkFAyNTazESR7Q7TOiAGcpY/8lGOy ZF14KxdfC9s8rYJfIM0QwNfhS/zXXAhSBBseMJgYYrRQ4tvLckjCLDzftmOTZAUqV041 d9ZT2o46otmtb/2+klRhbe19EMTMZzkqyE3QkfeGLZ+7cnuLIlrFgiCRuw3UjC6caO/G beHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ZVb6x2LoyaLhx5rBBa95Y8atuigcedtyK031fI91GGQ=; b=mPFUjDNoGnrRPx+9bCG1/xaE6N/tX5XVGJmBg8pyVFnK4Cy5kw093J/+O9/biSFA1g /ZDLRzSCw8EMv97gE94z+jY+VfYZfzhPAmnooJJ++JoN3xv1r/lcHfGSb/5EUw6UbpQl NsF8nfFPfiQzM1iGxEhnuWCwVIS8vX3XrMI/bSHBONizXUgsX9M8Ij++POZMj2SsfjYi RX9Yzvl/wyZ9cDa7WvRh0xeog8868xNyuPzcgvRcA84/QGFozd66x8k3CeApjId5uox6 RlVL/j+7gcwpdJbmJqpfpD0JbJiX0Pdugb3PINU6bzgZGjzqHZA3gjd+pId27b9x74b5 juxw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k27-20020a63561b000000b0051b52bacc82si22749548pgb.243.2023.04.29.03.46.13; Sat, 29 Apr 2023 03:46:23 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230095AbjD2KoO (ORCPT + 99 others); Sat, 29 Apr 2023 06:44:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbjD2KoN (ORCPT ); Sat, 29 Apr 2023 06:44:13 -0400 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08F5A1FCC for ; Sat, 29 Apr 2023 03:44:11 -0700 (PDT) Received: from fsav412.sakura.ne.jp (fsav412.sakura.ne.jp [133.242.250.111]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 33TAhme9028302; Sat, 29 Apr 2023 19:43:48 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav412.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav412.sakura.ne.jp); Sat, 29 Apr 2023 19:43:48 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav412.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 33TAhmOP028299 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sat, 29 Apr 2023 19:43:48 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <2a07bded-25e5-fd27-a2de-8b606e4d1d2c@I-love.SAKURA.ne.jp> Date: Sat, 29 Apr 2023 19:43:47 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] tty: tty_io: remove hung_up_tty_fops Content-Language: en-US To: Al Viro Cc: Nathan Chancellor , Jiri Slaby , Greg Kroah-Hartman , Dmitry Vyukov , syzbot , linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com References: <20230423233433.GF3390869@ZenIV> <20230424004431.GG3390869@ZenIV> <8e21256a-736e-4c2d-1ff4-723775bcac46@I-love.SAKURA.ne.jp> <2fca7932-5030-32c3-dd61-48dd78e58e11@I-love.SAKURA.ne.jp> <20230425160344.GS3390869@ZenIV> <1b405689-ea0a-6696-6709-d372ce72d68c@I-love.SAKURA.ne.jp> <5cebade5-0aa9-506c-c817-7bcf098eba89@I-love.SAKURA.ne.jp> <20230428162718.GA1099174@dev-arch.thelio-3990X> <6dca757e-74ac-773d-2a50-4e48b2f56880@I-love.SAKURA.ne.jp> <20230428171145.GD3390869@ZenIV> From: Tetsuo Handa In-Reply-To: <20230428171145.GD3390869@ZenIV> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 2023/04/29 2:11, Al Viro wrote: > On Sat, Apr 29, 2023 at 01:41:02AM +0900, Tetsuo Handa wrote: >> On 2023/04/29 1:27, Nathan Chancellor wrote: >>> I see this change has shown up in -next as commit 4c87e9e5479b ("tty: >>> tty_io: remove hung_up_tty_fops"), where it causes the following warning >>> for configurations without CONFIG_COMPAT (I used ARCH=arm defconfig): >>> >>> drivers/tty/tty_io.c:446:13: warning: 'hung_up_tty_compat_ioctl' defined but not used [-Wunused-function] >>> 446 | static long hung_up_tty_compat_ioctl(struct file *file, >>> | ^~~~~~~~~~~~~~~~~~~~~~~~ >>> >>> I am not sure if you just added that patch for additional test coverage >>> or for final acceptance but the following diff resolves this warning for >>> me, perhaps it can be folded in for a v2? >> >> Thank you for reporting. Yes, moving the definition will solve the warning. > > IDGI... Why do you need to keep that function at all? Compare it > with hung_up_tty_ioctl() - they are token-for-token identical; the only > difference is the function name... Indeed hung_up_tty_ioctl() and hung_up_tty_compat_ioctl() are identical. We can remove hung_up_tty_compat_ioctl() if we don't consider ld = tty_ldisc_ref_wait(tty); if (!ld) - return hung_up_tty_compat_ioctl(file, cmd, arg); + return hung_up_tty_ioctl(file, cmd, arg); if (ld->ops->compat_ioctl) retval = ld->ops->compat_ioctl(tty, cmd, arg); at tty_compat_ioctl() as strange looking. Maybe adding "inline" keyword to hung_up_tty_*() definitions because hung_up_tty_fops is removed?