Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2751091ybz; Sun, 19 Apr 2020 08:48:46 -0700 (PDT) X-Google-Smtp-Source: APiQypIPW+62fk/G0Rj0/4q0TiZsF4EBm3KUAnee49RALB87rBE4y5Iys/36PQtDzg0bf7KahsrJ X-Received: by 2002:a17:906:4e8f:: with SMTP id v15mr12507473eju.321.1587311326286; Sun, 19 Apr 2020 08:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587311326; cv=none; d=google.com; s=arc-20160816; b=FlsVcEP0sStGc8hX3hZVpBng+7qP5W4Hx05cbwu/y5BmK2J3URzrKGeVR9o+0NvBL9 A/LXmrDtV+BI7Fw69KDaz5SE8/OfnqYq5GUDh8XiB/jpO1LSoVHfWYhnhKBZqRzzBtOR N11YKufZs8/L/Rg5N8jvh3ESjuzt7zS5jiQ+Y4qIrBqfrLj3vCx6xTTELFq2RTMzCkok D/OPU/rI7hjXZEVUQS4bwDCa21N4uqCMMc1Y8Qz1uoNh6KpBwgQEXgPAJO0F327oqBR2 SmTk8FSpgpNAc8TVxyVZqo7dzwE7zTliaZ5koB4WwHuARtz3rXCFWXaual6vPsWVpywV pVyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=RclhL8sJsiY5PIfBoAsFTSBZFGfdaFZ8DXC9ZgsXXw4=; b=NkUct8VM+W9iwUNZ9E7j36+xr8r7qZpzwd1TgXj0hPZskIz3qcMJGsh3hBWFKojKq9 2PHNDtz/Vvdwdm8WtDvihrwsR6ZpfRXuoqWNOVETfXmlgaPd1GyaFvEclM1yXAR8h8YB 00S+hZL0spr52ljT+A5lGbcLIx4BVrz5ao/wCx1Mvx4kbYyo7/jpOd7vtqXGSm81PPc+ H21n+EAsdKx0kovQlDD4Kj4fy/iK++92Qg7g9SD8snKZBoepLxiESuLgR99VreYekDro 5uYiyTblR3EggxHWtM1EUbHSaLFeoEbGR5G2z+42O/MybK4ioNtByb7O7iQEKdMTOsBZ B0eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uTjnI2XD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jx10si13147827ejb.150.2020.04.19.08.48.23; Sun, 19 Apr 2020 08:48:46 -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=pass header.i=@gmail.com header.s=20161025 header.b=uTjnI2XD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgDSPo4 (ORCPT + 99 others); Sun, 19 Apr 2020 11:44:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726100AbgDSPoz (ORCPT ); Sun, 19 Apr 2020 11:44:55 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A304C061A0C; Sun, 19 Apr 2020 08:44:55 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id d1so3717377pfh.1; Sun, 19 Apr 2020 08:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=RclhL8sJsiY5PIfBoAsFTSBZFGfdaFZ8DXC9ZgsXXw4=; b=uTjnI2XDLaTrOOUKjI1BiFPHsLHqlIuNMn3tma00R+2fbcxpYSJ4l6JZTZSjpPjnjF ueCPGz8/nX3YUfDkuqBPh8zVyttZkh2B5cq9VLVv3fR+HVYM3w62ky6A0cFvAC4BrMBV KWxMrpQglhNIEOErZFXu12psn8p8l+4dMsUN83+aZP4g8dB1fLCvmAx8j9gX2fN5JcMX SS9KCbSR6xykMww5hAYLsJlMxlwjbXrjtg5M8AxDTJ7VWXCae01d6NqEOSlvtRxikiIM QzLlkUzauUKmmIdRZubnSFzCUU3PWXJ3UyzRKxngIzWNLhyWh4dWucyOsZbXHu1TJS0d ID2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=RclhL8sJsiY5PIfBoAsFTSBZFGfdaFZ8DXC9ZgsXXw4=; b=sIJsbH0tvH61by2cynBVam2pAkP5kqMlHDGa6++B8zVxwmcRkCfBF132zLWEYRWLuj vlQsIhszagAtPwwTQq89uNY9zzqg3Wctj4SLOXxcbrawRI2ItbOFAoJR7s8qdy8qn/T6 p0i+9zJI4bN0gsGzVWkQ7a3VwGJbpDk+myi56keDlsC0pw1Tt/qbGxLaHyco/RKax4NG o3GfI/dXkIsG49Ky+FQ1iJf2rmF+dP7RgbqhDeVDLQg+lOH/lN8o6Yd1qLkNg/0X9dLS 3omrsqKD2xsjg5x3i7ZFe5eilQVcFR9JQO44EIefnwfgJsIEjyIUtQDxDNojSzFCwU8W dcIA== X-Gm-Message-State: AGi0Pub7aOJl43i0TzLNUHo5dQ1lNmIVYApeeMwGGuUT+Xi9QmVNXlcq 9KKeseNVXMnTuYrF5VZWsCA= X-Received: by 2002:a62:6dc6:: with SMTP id i189mr12950516pfc.30.1587311094792; Sun, 19 Apr 2020 08:44:54 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:610d:f65:24cf:c6c4:f8fd:66fc]) by smtp.gmail.com with ESMTPSA id z6sm23199319pgg.39.2020.04.19.08.44.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 08:44:54 -0700 (PDT) From: Aishwarya Ramakrishnan To: "David S. Miller" , Heiner Kallweit , Jakub Kicinski , "Michael S. Tsirkin" , Martin Habets , Aishwarya Ramakrishnan , Jonathan Lemon , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: sun: Remove unneeded cast from memory allocation Date: Sun, 19 Apr 2020 21:14:43 +0530 Message-Id: <20200419154444.21977-1-aishwaryarj100@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: casting value returned by memory allocation function to (struct cas_init_block *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Aishwarya Ramakrishnan --- drivers/net/ethernet/sun/cassini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index e6d1aa882fa5..3ee6ab104cb9 100644 --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/cassini.c @@ -5059,7 +5059,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (cp->cas_flags & CAS_FLAG_SATURN) cas_saturn_firmware_init(cp); - cp->init_block = (struct cas_init_block *) + cp->init_block = pci_alloc_consistent(pdev, sizeof(struct cas_init_block), &cp->block_dvma); if (!cp->init_block) { -- 2.17.1