Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3257300ybz; Sun, 19 Apr 2020 22:14:00 -0700 (PDT) X-Google-Smtp-Source: APiQypKjpyVr1KJwK2sQWwEiA9ZCaj1ncfN8S6Jf3skEapNg8MzIfurtBOQNm2a+e98DEwiwty8U X-Received: by 2002:aa7:df0a:: with SMTP id c10mr12031557edy.306.1587359639999; Sun, 19 Apr 2020 22:13:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587359639; cv=pass; d=google.com; s=arc-20160816; b=h16hWWjH1AbNGrBaM9MF9qIqf2JsVrtLChddswCxoFY0cBMQIGidm8gA/CfNe+EC3W T3OpDEXojDkp70jPPhleYcyrpGZgUWysTydS6P9OG7AmG/mQH1vbEYRJ04vAb81VoFcg qA66vbE4hrytMyCbU1P048XCxiYnbygZXim/hmQ3BvVEa1qfQiwQhCXWGKkES4eAiihF rtp3wYbtx/q2Ot5oYy0Y1FeDD9w6zjGFFtp58uNobnag8zzOOq3FvkDlLbyhT0j/4QRO z52GZOqBiYJqbV+FmWE187e9IfGxkz75fjZPbdm02UJL9lkTv2QR7tIGP/Id79UeU8XU It9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from:dkim-signature :dkim-signature; bh=Tzbd1D6ra7UcjlsDVBlFv2vsJBrgSNkjZ9HMsTrz4Ww=; b=yIf+GNxy2yg5XNGjdvR4XyPlDjKa66XKViKSWgEVAxuGIrQmIn1NqheXCBSCxNnPzG loRH9JuCIrOW7PoMiBPx6rLvcnM8Lw6WCvzTKfxy5X76cD/or682oeJmnRprJPSRW6vc L7fS2t1g4zW4A8vpU22wSZBVpe8duQWJQSkNLQA8r5bbzyfvD+tKqEd/ebGUnK9BRzrD jbNY55/+0Uyy/Vn94vIqV8mSFa2EOdRz+041PqggZQzSKOsrCQOJ/B9oWV4N9GewlZYX 9RFyYtG8+A6hQJvcJ42PFydAAqAyygadcBKvCVSYyj95/DFzeAFM8q3i1q5Kb8UnCxBV RL/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@marvell.com header.s=pfpt0818 header.b=ctodHb9P; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector1-marvell-onmicrosoft-com header.b="OVNd/87S"; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w19si13974531edx.386.2020.04.19.22.13.37; Sun, 19 Apr 2020 22:13:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marvell.com header.s=pfpt0818 header.b=ctodHb9P; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector1-marvell-onmicrosoft-com header.b="OVNd/87S"; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726079AbgDTFMD (ORCPT + 99 others); Mon, 20 Apr 2020 01:12:03 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:35808 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725710AbgDTFMC (ORCPT ); Mon, 20 Apr 2020 01:12:02 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03K5BPDZ026140; Sun, 19 Apr 2020 22:11:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=Tzbd1D6ra7UcjlsDVBlFv2vsJBrgSNkjZ9HMsTrz4Ww=; b=ctodHb9Pq0o7Bpm+UCdXHwsMC5YfA1xH/VK88AyqHc6+wX7iaP9h8OuudcKgnSNmf38i iEiSca7BXGfbkh6kzESF9JW1mWZChN+2uij/CCifcm6PvgzIsYFy/QcE/UUXcWeV1xGg gNpzS+oaeFFqtYsAOvI++yk71yGAgtidDtOKUdxf4ZV6JcRw30oOTuOHOweoAx1UZKYR 7HIpvtaZk93JOB8jH49tFU9bTbb529k+jA14KSlwv52+E0uPIR5ZeEGjjcbPkd5UauMp 4XAR7a5jtnjFIjI+3+qQtrWD6LWtxII5/Z8J+5Ev+GQ9BOzQHNT1ogyZd1EOA74pcdSN 6Q== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 30fxwp5u1v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 19 Apr 2020 22:11:58 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 19 Apr 2020 22:11:57 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 19 Apr 2020 22:11:56 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.52) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 19 Apr 2020 22:11:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OOihqAtTujCq/1M11IjqERIPwYJHcXG5rbJt0liNITpkQG/WyWZILGqJJUExPEC+I1Iatbe1gUYbxLFf5Aqlsb8cTonGAX7ibbpSxeFrZwMah5W/Aj2Tk28XKIPkqQXVaDoJ2djYY7OemWgQEgyxtaSFNwVB2Q82oPcmuE6n0r7DSUaLsEPM1po2h+6sGWSzB9DiK/WgSlmems9Vk0pBNREsx9GHieCdPsfIQxA0V3pc03WJioj254a3+M5YdSiBgqARAFfR6yXXFdaYJWiW0WLSXYvhAPwkDqxYAUU16FDAirKty5I1117LVi7UZR7kmPcjB4uekQR+3NUM0jfHiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Tzbd1D6ra7UcjlsDVBlFv2vsJBrgSNkjZ9HMsTrz4Ww=; b=fI4rdxBtW+wD7PU9WxbzGrIWcbMrQeyak84NoOwzbsgwOVego07n2v9tT4rZUN+4wFY9HfH4eVh/uthAotYxz/g16OOc6eeBhevbuitiswhzcPJZ/E5I5qsgq2ofBrQGRCPew6qD0oz0A1gwQ8VabgTCbvBu+IoSKaSq7aUzW4L7fNiLuXAaDq0JuGTD6luTyfyCHMIutvdkopFlVQSrxZCG14qayae668KhedENrrbu25Og/nVraF3MQ7GFtBoOZRJtBOrein2k7aSNG9Nw4V2uPuurBFq/XhOJWTcl1RXcqIvhp0saHCfDm/YuQEodN7R7Dk+Whi4h4nFd/JGZdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Tzbd1D6ra7UcjlsDVBlFv2vsJBrgSNkjZ9HMsTrz4Ww=; b=OVNd/87Sb83euSSK/Qo4CfylZ2o1DS69NPgZoV0XTuHiWmZBpwpws4MwKjwGV9Dos37FEL4+Al5u8uAhKJKNvqDvsMYp+iVFvHjJXUUaWLR7pHe6zb+UtoovXAQdy0Sco0QkBZkMEABrC7QO4hb0AoD+pXxV6KuF4sOgq58cygA= Received: from MN2PR18MB3182.namprd18.prod.outlook.com (2603:10b6:208:163::15) by MN2PR18MB2480.namprd18.prod.outlook.com (2603:10b6:208:100::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 05:11:55 +0000 Received: from MN2PR18MB3182.namprd18.prod.outlook.com ([fe80::71dc:797b:941a:9032]) by MN2PR18MB3182.namprd18.prod.outlook.com ([fe80::71dc:797b:941a:9032%3]) with mapi id 15.20.2921.027; Mon, 20 Apr 2020 05:11:55 +0000 From: Michal Kalderon To: Aishwarya Ramakrishnan , Ariel Elior , GR-everest-linux-l2 , "David S. Miller" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [EXT] [PATCH] net: qed: Remove unneeded cast from memory allocation Thread-Topic: [EXT] [PATCH] net: qed: Remove unneeded cast from memory allocation Thread-Index: AQHWFmwoeqWB1WncF0miF4Eo8ULEd6iBd3iQ Date: Mon, 20 Apr 2020 05:11:54 +0000 Message-ID: References: <20200419162917.23030-1-aishwaryarj100@gmail.com> In-Reply-To: <20200419162917.23030-1-aishwaryarj100@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [109.64.70.43] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f6fc88e6-6a7e-4417-a073-08d7e4e95802 x-ms-traffictypediagnostic: MN2PR18MB2480: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1013; x-forefront-prvs: 03793408BA x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR18MB3182.namprd18.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10009020)(4636009)(396003)(39850400004)(136003)(376002)(366004)(346002)(86362001)(26005)(71200400001)(55016002)(186003)(2906002)(6506007)(5660300002)(64756008)(478600001)(8936002)(9686003)(66556008)(110136005)(66946007)(52536014)(81156014)(33656002)(8676002)(76116006)(316002)(7696005)(66446008)(66476007);DIR:OUT;SFP:1101; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Dp8RI4VAR5vN5thsc0QqrWvRsEIAMiW1dNz+4KuIZ6etHFbbMGEshT83vUpB647Ks4UC7ut9lzTFhB2BOLOvtchXK0xYaQOhYb/Tr1DFnY+Mwo5L3OSXMR/yqkSdKlZMzVg51zAQMZ6vPDuXbicjRVk41R5h5AR8U2vBZrtDJcqkqjKz2g7KP3q1MSkYsRqAFWevefw4MkPPvV2FGdR7CUD2/4eH1jBM+vDvroN9C89oD/yUI4RJ6LRN9oBquO7ySUWX0lAG7IWn0z7+PeSvCgt3aWAhgNpTAo5IiHKIj3z241AqLlYyumXPMFXORcAwxUDDVsWjpWpUPL9IYkPQCp5b0vPJmbltYeRtaeDlYqxgY4yVgev/OzsPp3p2QiPflVsx9TtridkjfBayrVhRQ+qHlcuhv69sivAPka2aw0Vvx7zrMBV2eylsgiLAwJZQ x-ms-exchange-antispam-messagedata: DR5IarunLr05J2wb/pJddqjK+ynhEATrap9yMXl1ztlx1ri0KO7TU88/lqHjNu1PQKEan80uA93Y/cnT7v20S096lbQzX74A4yn2QESHPLrgQMyrYcP02xk6ngan04cVAlEUpUTQdedeNzjB8aTA/w== Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: f6fc88e6-6a7e-4417-a073-08d7e4e95802 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2020 05:11:55.0055 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: N4qL+EFE/Hg+UF4Y0x6dJxk0amQYHlaaBlFTH1U9pcftHaPy3ggNdCjdEM6BNYU1BSgxJGOpG9PcN5mWnXysIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2480 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-20_01:2020-04-17,2020-04-20 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Aishwarya Ramakrishnan > Sent: Sunday, April 19, 2020 7:29 PM >=20 > ---------------------------------------------------------------------- > Remove casting the values returned by memory allocation function. >=20 > Coccinelle emits WARNING: casting value returned by memory allocation > function to struct pointer is useless. >=20 > This issue was detected by using the Coccinelle. >=20 > Signed-off-by: Aishwarya Ramakrishnan > --- > drivers/net/ethernet/qlogic/qed/qed_roce.c | 17 ++++++++--------- > 1 file changed, 8 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/net/ethernet/qlogic/qed/qed_roce.c > b/drivers/net/ethernet/qlogic/qed/qed_roce.c > index 37e70562a964..475b89903f46 100644 > --- a/drivers/net/ethernet/qlogic/qed/qed_roce.c > +++ b/drivers/net/ethernet/qlogic/qed/qed_roce.c > @@ -736,9 +736,9 @@ static int qed_roce_sp_destroy_qp_responder(struct > qed_hwfn *p_hwfn, >=20 > p_ramrod =3D &p_ent->ramrod.roce_destroy_qp_resp; >=20 > - p_ramrod_res =3D (struct roce_destroy_qp_resp_output_params *) > - dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, > sizeof(*p_ramrod_res), > - &ramrod_res_phys, GFP_KERNEL); > + p_ramrod_res =3D dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, > + sizeof(*p_ramrod_res), > + &ramrod_res_phys, GFP_KERNEL); >=20 > if (!p_ramrod_res) { > rc =3D -ENOMEM; > @@ -872,10 +872,10 @@ int qed_roce_query_qp(struct qed_hwfn > *p_hwfn, > } >=20 > /* Send a query responder ramrod to FW to get RQ-PSN and state */ > - p_resp_ramrod_res =3D (struct roce_query_qp_resp_output_params > *) > - dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, > - sizeof(*p_resp_ramrod_res), > - &resp_ramrod_res_phys, GFP_KERNEL); > + p_resp_ramrod_res =3D > + dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, > + sizeof(*p_resp_ramrod_res), > + &resp_ramrod_res_phys, GFP_KERNEL); > if (!p_resp_ramrod_res) { > DP_NOTICE(p_hwfn, > "qed query qp failed: cannot allocate memory > (ramrod)\n"); @@ -920,8 +920,7 @@ int qed_roce_query_qp(struct > qed_hwfn *p_hwfn, > } >=20 > /* Send a query requester ramrod to FW to get SQ-PSN and state */ > - p_req_ramrod_res =3D (struct roce_query_qp_req_output_params *) > - dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, > + p_req_ramrod_res =3D dma_alloc_coherent(&p_hwfn->cdev->pdev- > >dev, > sizeof(*p_req_ramrod_res), > &req_ramrod_res_phys, > GFP_KERNEL); > -- > 2.17.1 Thanks,=A0 Acked-by: Michal Kalderon=A0