Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5435807rwr; Tue, 9 May 2023 01:08:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Hm5EDIK7tlj8+lv/prD2uAFWIt5Xz8qiZd7Hxe0l6vHXSj5qsHSg+YT6jIRRTjUxnH6E+ X-Received: by 2002:a05:6a20:6a10:b0:ee:9272:73f8 with SMTP id p16-20020a056a206a1000b000ee927273f8mr17347420pzk.36.1683619693520; Tue, 09 May 2023 01:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683619693; cv=none; d=google.com; s=arc-20160816; b=bnw5HUdh23jWYKQ/SIwZmxOIOYrxmSGUKYE5JfjlllxI+W457TTbkKJX7mwvoai8KP hmJmNxRWLyZfr+0+TpL+6EJQN6s7lfU8aHxtO7/6j9G+r3Y2L4U7CEC4ZBNRxR5w2xuR sXMBm4F/mNBni9mzPrXBLU+osSOL9rv5ErBj3eThl53zCoQSEBouwc4j/sZfbBHIjlFO dPjNIM4z45FM0KCoWC6UdNMnYpqcAGm1ZFiDIXMx1jTB+N2P2Zr8aDIjjwFrGsMBm2IP yXCgQgzVICpoEHLFNaKEf4OeX0SbpFglkYSdxwbm4LmxMdw9ed/BKmIDNyzGqreb3rJ1 89kA== 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 :message-id:date:subject:cc:to:from; bh=JlS+xCmxPKjkmIVncHKlLgAi11wvF8DQg2iX1Krfo0I=; b=pdYz/g2lhyEinIowMnoFBCkM+HeDnfuKitEZ4eTH9qTzk2WHpRQ7Hp5Tt/B6VwussS 8fPGlOJwwZ6HdcoZG29yPOh0xW2HeQXn+hpjlWKubRv8OMRdmPj4iBluwlZaxLjBWhUn Aqd6dAxJlLKmXzrcuLnog59D8K/DP2Q8AGORf8X6ah1NsMUdpMis0SFaK0p67w70BXLD GMegWR3IIyIyMF1CHpLihGWzxlEmFG2974J+huses8N/uBDQIma8/SgZyGnFbGbo+iMn kwIrYTgIbJ0NeWvv7qk1PYK3IQZiZKqxLnWwsOMulZCMUTPPz1cRGqZEVLqlP1QU5dFa knNg== 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 i30-20020a63585e000000b0052856cec94asi931189pgm.884.2023.05.09.01.07.58; Tue, 09 May 2023 01:08:13 -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 S234156AbjEIHkP (ORCPT + 99 others); Tue, 9 May 2023 03:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjEIHkN (ORCPT ); Tue, 9 May 2023 03:40:13 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 3C0C183D2; Tue, 9 May 2023 00:40:08 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 3A4C418013AEE1; Tue, 9 May 2023 15:40:05 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: auro Carvalho Chehab , Hans Verkuil Cc: Baisong Zhong , Jakub Kicinski , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Su Hui Subject: [PATCH] media: usb: remove unnecessary (void*) conversions Date: Tue, 9 May 2023 15:40:01 +0800 Message-Id: <20230509074001.136455-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 No need cast (void*) to (struct dvb_usb_device *), (struct filter_info *) or (struct az6027_device_state *). Signed-off-by: Su Hui --- drivers/media/usb/dvb-usb-v2/az6007.c | 16 ++++++++-------- drivers/media/usb/dvb-usb/az6027.c | 18 +++++++++--------- drivers/media/usb/dvb-usb/pctv452e.c | 4 ++-- drivers/media/usb/ttusb-dec/ttusb_dec.c | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/az6007.c b/drivers/media/usb/dvb-usb-v2/az6007.c index 62ee09f28a0b..81a498d24075 100644 --- a/drivers/media/usb/dvb-usb-v2/az6007.c +++ b/drivers/media/usb/dvb-usb-v2/az6007.c @@ -248,7 +248,7 @@ static int az6007_ci_read_attribute_mem(struct dvb_ca_en50221 *ca, int slot, int address) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6007_device_state *state = d_to_priv(d); int ret; @@ -290,7 +290,7 @@ static int az6007_ci_write_attribute_mem(struct dvb_ca_en50221 *ca, int address, u8 value) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6007_device_state *state = d_to_priv(d); int ret; @@ -321,7 +321,7 @@ static int az6007_ci_read_cam_control(struct dvb_ca_en50221 *ca, int slot, u8 address) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6007_device_state *state = d_to_priv(d); int ret; @@ -367,7 +367,7 @@ static int az6007_ci_write_cam_control(struct dvb_ca_en50221 *ca, u8 address, u8 value) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6007_device_state *state = d_to_priv(d); int ret; @@ -398,7 +398,7 @@ static int az6007_ci_write_cam_control(struct dvb_ca_en50221 *ca, static int CI_CamReady(struct dvb_ca_en50221 *ca, int slot) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; int ret; u8 req; @@ -429,7 +429,7 @@ static int CI_CamReady(struct dvb_ca_en50221 *ca, int slot) static int az6007_ci_slot_reset(struct dvb_ca_en50221 *ca, int slot) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6007_device_state *state = d_to_priv(d); int ret, i; @@ -485,7 +485,7 @@ static int az6007_ci_slot_shutdown(struct dvb_ca_en50221 *ca, int slot) static int az6007_ci_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6007_device_state *state = d_to_priv(d); int ret; @@ -514,7 +514,7 @@ static int az6007_ci_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) static int az6007_ci_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6007_device_state *state = d_to_priv(d); int ret; u8 req; diff --git a/drivers/media/usb/dvb-usb/az6027.c b/drivers/media/usb/dvb-usb/az6027.c index f7a6ab29e530..9d0847190748 100644 --- a/drivers/media/usb/dvb-usb/az6027.c +++ b/drivers/media/usb/dvb-usb/az6027.c @@ -407,7 +407,7 @@ static int az6027_ci_read_attribute_mem(struct dvb_ca_en50221 *ca, int slot, int address) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6027_device_state *state = d->priv; int ret; @@ -449,8 +449,8 @@ static int az6027_ci_write_attribute_mem(struct dvb_ca_en50221 *ca, int address, u8 value) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; - struct az6027_device_state *state = (struct az6027_device_state *)d->priv; + struct dvb_usb_device *d = ca->data; + struct az6027_device_state *state = d->priv; int ret; u8 req; @@ -480,7 +480,7 @@ static int az6027_ci_read_cam_control(struct dvb_ca_en50221 *ca, int slot, u8 address) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6027_device_state *state = d->priv; int ret; @@ -526,7 +526,7 @@ static int az6027_ci_write_cam_control(struct dvb_ca_en50221 *ca, u8 address, u8 value) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6027_device_state *state = d->priv; int ret; @@ -557,7 +557,7 @@ static int az6027_ci_write_cam_control(struct dvb_ca_en50221 *ca, static int CI_CamReady(struct dvb_ca_en50221 *ca, int slot) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; int ret; u8 req; @@ -588,7 +588,7 @@ static int CI_CamReady(struct dvb_ca_en50221 *ca, int slot) static int az6027_ci_slot_reset(struct dvb_ca_en50221 *ca, int slot) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6027_device_state *state = d->priv; int ret, i; @@ -644,7 +644,7 @@ static int az6027_ci_slot_shutdown(struct dvb_ca_en50221 *ca, int slot) static int az6027_ci_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6027_device_state *state = d->priv; int ret; @@ -673,7 +673,7 @@ static int az6027_ci_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) static int az6027_ci_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct az6027_device_state *state = d->priv; int ret; u8 req; diff --git a/drivers/media/usb/dvb-usb/pctv452e.c b/drivers/media/usb/dvb-usb/pctv452e.c index 42763c12cf29..2aab49003493 100644 --- a/drivers/media/usb/dvb-usb/pctv452e.c +++ b/drivers/media/usb/dvb-usb/pctv452e.c @@ -159,7 +159,7 @@ static int tt3650_ci_msg_locked(struct dvb_ca_en50221 *ca, u8 cmd, u8 *data, unsigned int write_len, unsigned int read_len) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct pctv452e_state *state = d->priv; int ret; @@ -292,7 +292,7 @@ static int tt3650_ci_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) static int tt3650_ci_slot_reset(struct dvb_ca_en50221 *ca, int slot) { - struct dvb_usb_device *d = (struct dvb_usb_device *)ca->data; + struct dvb_usb_device *d = ca->data; struct pctv452e_state *state = d->priv; u8 buf[1]; int ret; diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c index 38822cedd93a..6bf2e7e0f6d2 100644 --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c @@ -1128,7 +1128,7 @@ static int ttusb_dec_stop_sec_feed(struct dvb_demux_feed *dvbdmxfeed) { struct ttusb_dec *dec = dvbdmxfeed->demux->priv; u8 b0[] = { 0x00, 0x00 }; - struct filter_info *finfo = (struct filter_info *)dvbdmxfeed->priv; + struct filter_info *finfo = dvbdmxfeed->priv; unsigned long flags; b0[1] = finfo->stream_id; -- 2.30.2