Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp891349rwl; Thu, 10 Aug 2023 03:21:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBSjFY3Q2KReCigI8+EhzJGF16y8en98iNR6QmMl2nDJHBfqbm+/lWaFjAsxFKOHdWYAS8 X-Received: by 2002:a17:906:8a72:b0:994:4095:3abf with SMTP id hy18-20020a1709068a7200b0099440953abfmr1693379ejc.14.1691662916675; Thu, 10 Aug 2023 03:21:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691662916; cv=none; d=google.com; s=arc-20160816; b=fqfPt9PXS+Vk3A86BjnFua2t9e8/Zmj3cP5F4nt7xQAQLaeWZ10XN22Dze4/8ZkL54 wAniHGN1Cq0NzeJiatIvd1gZBajZkPHXyxD/C0Ow4ZqDZLEmooesK/bHPSspT2UUmQPv CKKGAP7duT7gVeQ5rJdROqCTlvq3icPRoHQzGGl+VlHt8TTOtOrmbc0oGTbdH7JStSFj d29OlvTFEWqxPpeMZ6/zhUViFawRyl4NYvsaZrez5L7xQ/nMOLlcl+DgrLHAC/tHFmmA 3gJ9tB8RlkulMiroPpLHFoJVlEtwn1oMuWeakADJZ/I6kOWG4bYMJ64MYrBkWZKzrG08 T9Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=s7zbhE/ngmj7NK36mI6M5NCi5Y8LRabyZt7F5U++O7M=; fh=eVRAMeovUMCs5gyLVWnL4vEbXcaInjmQ18Go7266gJI=; b=k4gYa13Ko0qpOYvTR4oh+5OUrQUf2wsHI8NKdiq1Es8nalE0/t9i4jhJeYJbBW6JYB ww/S0J/CBHxaSm39jCtBCbU4P8sr5d1Zje/pQJQx7cW3SxyL3Hxx7pWc5+/aHPucZkMi zyeSByatlWF3fZHEsUOw/hsh58sakhTgc/kQedayEkgRhpBVFXJj07zibcAFlEacpgxy 7pqWXexbqaAKKdU9Uf/yRbayN9sE/FMj7TJknh1EIVTRLmf2qgoi64VdDKswbqPrJPmG HKXENMRNDpbP0+xHyD7kMg7TGL/bqinmewS2tHhQlBW0c7uGjHEUQMSyIK2zdX+89lIR IrCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z8Vjq2Iy; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a17090637c900b0099bd5b27329si1154718ejc.523.2023.08.10.03.21.31; Thu, 10 Aug 2023 03:21:56 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z8Vjq2Iy; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234362AbjHJJPn (ORCPT + 99 others); Thu, 10 Aug 2023 05:15:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234229AbjHJJPV (ORCPT ); Thu, 10 Aug 2023 05:15:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F6D726B6; Thu, 10 Aug 2023 02:15:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F332E612F0; Thu, 10 Aug 2023 09:15:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7DF6C433C9; Thu, 10 Aug 2023 09:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691658920; bh=YDWGPVyFFTBkDIsAMqAh/xIPdpc9bI1p2CZBhTV0lsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z8Vjq2IySAIOqr+y9oQ+Lfam7x6S14t+ggiuKN9PFXr+Bj5Ka056zHITD6Kt0wqI9 37tMNLz7+Ly6rb5I/kFkuBn44zM6jDzdia1TAVmXjZuQ1ht4XabobY+SXXDkgqqimL DB1C5eXcDuHXlcESRMY08Fzmp+sxfOp+AuVWSLE1W565DOGIVnl1z9WxS9qugG23K4 PmL4PWzW/BLyq68A/YKV9X8UaFxs0hDr1Imp9Pr62QUDnOZxNRGGZYhtbWTsMw2Gfe BVEbq89LBW9wUBf5mkwEGFSYd9FB95cDL0EE2HfYDl5HNiYYFGlly8Xrgn7bR5moeF gg1BEHOk3VO8g== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski Subject: [PATCH 03/36] tty: remove dummy tty_ldisc_ops::poll() implementations Date: Thu, 10 Aug 2023 11:14:37 +0200 Message-ID: <20230810091510.13006-4-jirislaby@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230810091510.13006-1-jirislaby@kernel.org> References: <20230810091510.13006-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 tty_ldisc_ops::poll() is optional and needs not be provided. It is equal to returning 0. So remove all those from the code. Signed-off-by: Jiri Slaby (SUSE) Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Krzysztof Kozlowski --- drivers/bluetooth/hci_ldisc.c | 7 ------- drivers/net/ppp/ppp_async.c | 8 -------- drivers/net/ppp/ppp_synctty.c | 8 -------- net/nfc/nci/uart.c | 7 ------- 4 files changed, 30 deletions(-) diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index a76eb98c0047..759472686831 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -819,12 +819,6 @@ static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file, return 0; } -static __poll_t hci_uart_tty_poll(struct tty_struct *tty, - struct file *filp, poll_table *wait) -{ - return 0; -} - static struct tty_ldisc_ops hci_uart_ldisc = { .owner = THIS_MODULE, .num = N_HCI, @@ -835,7 +829,6 @@ static struct tty_ldisc_ops hci_uart_ldisc = { .write = hci_uart_tty_write, .ioctl = hci_uart_tty_ioctl, .compat_ioctl = hci_uart_tty_ioctl, - .poll = hci_uart_tty_poll, .receive_buf = hci_uart_tty_receive, .write_wakeup = hci_uart_tty_wakeup, }; diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c index 15a179631903..f420bddb6a8c 100644 --- a/drivers/net/ppp/ppp_async.c +++ b/drivers/net/ppp/ppp_async.c @@ -328,13 +328,6 @@ ppp_asynctty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) return err; } -/* No kernel lock - fine */ -static __poll_t -ppp_asynctty_poll(struct tty_struct *tty, struct file *file, poll_table *wait) -{ - return 0; -} - /* May sleep, don't call from interrupt level or with interrupts disabled */ static void ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf, @@ -378,7 +371,6 @@ static struct tty_ldisc_ops ppp_ldisc = { .read = ppp_asynctty_read, .write = ppp_asynctty_write, .ioctl = ppp_asynctty_ioctl, - .poll = ppp_asynctty_poll, .receive_buf = ppp_asynctty_receive, .write_wakeup = ppp_asynctty_wakeup, }; diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c index 18283b7b94bc..86dacef84c6c 100644 --- a/drivers/net/ppp/ppp_synctty.c +++ b/drivers/net/ppp/ppp_synctty.c @@ -321,13 +321,6 @@ ppp_synctty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) return err; } -/* No kernel lock - fine */ -static __poll_t -ppp_sync_poll(struct tty_struct *tty, struct file *file, poll_table *wait) -{ - return 0; -} - /* May sleep, don't call from interrupt level or with interrupts disabled */ static void ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf, @@ -371,7 +364,6 @@ static struct tty_ldisc_ops ppp_sync_ldisc = { .read = ppp_sync_read, .write = ppp_sync_write, .ioctl = ppp_synctty_ioctl, - .poll = ppp_sync_poll, .receive_buf = ppp_sync_receive, .write_wakeup = ppp_sync_wakeup, }; diff --git a/net/nfc/nci/uart.c b/net/nfc/nci/uart.c index 082f94be0996..c8249d95306d 100644 --- a/net/nfc/nci/uart.c +++ b/net/nfc/nci/uart.c @@ -357,12 +357,6 @@ static ssize_t nci_uart_tty_write(struct tty_struct *tty, struct file *file, return 0; } -static __poll_t nci_uart_tty_poll(struct tty_struct *tty, - struct file *filp, poll_table *wait) -{ - return 0; -} - static int nci_uart_send(struct nci_uart *nu, struct sk_buff *skb) { /* Queue TX packet */ @@ -435,7 +429,6 @@ static struct tty_ldisc_ops nci_uart_ldisc = { .close = nci_uart_tty_close, .read = nci_uart_tty_read, .write = nci_uart_tty_write, - .poll = nci_uart_tty_poll, .receive_buf = nci_uart_tty_receive, .write_wakeup = nci_uart_tty_wakeup, .ioctl = nci_uart_tty_ioctl, -- 2.41.0