From patchwork Tue Nov 15 02:14:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 20131 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2479614wru; Mon, 14 Nov 2022 18:37:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf40tVzxvfLyjQYfjrfHQpVbHkGCO5xvOrAer+EwEKH+j378gEvvewyA5Wtwhrp3tBVpatNF X-Received: by 2002:a17:906:8556:b0:7ad:e518:13fd with SMTP id h22-20020a170906855600b007ade51813fdmr12125675ejy.323.1668479837302; Mon, 14 Nov 2022 18:37:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668479837; cv=none; d=google.com; s=arc-20160816; b=0Uug79E/a2Yy6Qd0PQf7lS46VyYrSlZzUDA4DxwJYKwGd2zxPvCCSM4qEJ/N+8oUOL LRdZ+cIJWXhBLNW2OxEMM2+vyUppOHOFA1LDuTqxvfF14yXZ2UDlkscFrmw874ompzC3 DupzBHeJqA4MoEQzjLJS+rHsw2a5/fav8b5GihQoPjfKKQTjpSQZhBDY8uqsgMh0J9Mn HAhq2qayeVgwa8Spgw2kBkmVsVBavAFnwEGbpXzlAtFI1VL5QeCy/xn4Dvk/NGTTcLQC fWp9tFMMXrCB1s7dMIeLUa5Eqp4sQxlcdZSfO4fx++9qvylsaMsmwZ2Z3tckh5TcZrA7 +xNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=8tP1P9cgKDNiqGzW7QlE5MB85gHOsqIae4ctrPGpDCM=; b=weQrh7r20QL5BvXJxdd9zC0HUiaBD3BfXvTF7qx/2estzt1kLBsp1WH87pMuStf+aI lMLd4/gyM56i7jdyaIINBedhwVXumUsiEpCmdfQAtpP+mAyx2WlFQlldLQqkU0Skwyq0 L75E7ju8aXzg9BLzsb83W8ydH41p5f+5C3JMFRDwCreh+2hnJqtyTnxddQLnt277V5ng ctA0mQe+EGzM59oVVYFEKiGS3riax5xTACdnKuxd0gXXE9QnupK34yXyID3RWPlvUUy9 iHHE9J4HHXkNco9eQ0n0tqDwwqTG3x0vWM8Op2C4u+xLEScEgVoOQNOBIXOQ5Eczs1+Z 9/7Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ec16-20020a170906b6d000b0078db517075fsi8648183ejb.659.2022.11.14.18.36.52; Mon, 14 Nov 2022 18:37:17 -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; 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 S236364AbiKOCOc (ORCPT + 99 others); Mon, 14 Nov 2022 21:14:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231202AbiKOCOb (ORCPT ); Mon, 14 Nov 2022 21:14:31 -0500 Received: from mail.nfschina.com (unknown [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B6536437; Mon, 14 Nov 2022 18:14:30 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 593011E80DAD; Tue, 15 Nov 2022 10:11:32 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tE6_o7KRDhP3; Tue, 15 Nov 2022 10:11:29 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 6B0961E80DAC; Tue, 15 Nov 2022 10:11:29 +0800 (CST) From: Li zeming To: jreuter@yaina.de, ralf@linux-mips.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: linux-hams@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] ax25: af_ax25: Remove unnecessary (void*) conversions Date: Tue, 15 Nov 2022 10:14:24 +0800 Message-Id: <20221115021424.3367-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MAY_BE_FORGED, SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749527914205479484?= X-GMAIL-MSGID: =?utf-8?q?1749527914205479484?= The valptr pointer is of (void *) type, so other pointers need not be forced to assign values to it. Signed-off-by: Li zeming --- net/ax25/af_ax25.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 6b4c25a92377..d8da400cb4de 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -723,7 +723,7 @@ static int ax25_getsockopt(struct socket *sock, int level, int optname, if (maxlen < 1) return -EFAULT; - valptr = (void *) &val; + valptr = &val; length = min_t(unsigned int, maxlen, sizeof(int)); lock_sock(sk); @@ -785,7 +785,7 @@ static int ax25_getsockopt(struct socket *sock, int level, int optname, length = 1; } - valptr = (void *) devname; + valptr = devname; break; default: