Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp193358pxx; Wed, 28 Oct 2020 02:19:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjgmSm+q2qHRz85shNfk8SZDN6/6Xlb4g9QTTNYW+hAnLKMXGruykhRKWgk9I/ir/59Iee X-Received: by 2002:a50:d987:: with SMTP id w7mr6618287edj.113.1603876759282; Wed, 28 Oct 2020 02:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603876759; cv=none; d=google.com; s=arc-20160816; b=pCcmCMSM8tqx5actZ1415Qb7LkbQ4yoocig+QY6JSSngveZZWrUjma8v/ZY9duL1Tt +Zh6ehoYUWkQ8rXXgBW2Xrdfn/wJzvpm6fuJ0cxkQnkKzMPBNkQi7dmrsiJ0K+ZvoZNw aEL7j4Zq3km45GQoFzLkQyRcFCv+TKNgASyy+/m5R868cjAwa1ERjSuwzloDQRpEBaH5 ywWcIr1gEjTg95CN2hD/3mkGk1VXC9UEdoZHG0/xzMP+ieMdwIEgiUst7iPeGflIjn0F /arZw4gI63JB4Nch7AhW3qkQNA1N6veLkXxs5b9g+9g9tuJJqsmoguz+c2Sfa7BEa/Oe kqiA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p1Mp7xRoEUvzdXrk/zqjKQbmch/Sm5IgredSjZSd+VQ=; b=MRqgBN+Q52v4sqpDxgN5kzk03CCPmuwWGhIWZ4Ivw+XiTgiHkb9grcJHIeu1vKsuKD ntU1UDyPRNEVkkSCs4r0Qdo+Mw+OE/CRhMAJ9ZKoCIOgTe2YkQd+Fzxk7Z3NDuPhi6HK C/EheG6fOz0wsV4oqu+tz0J9ZDFW+AqYz+QuVi+Dnds7aIZh3WNxdkXfuH16RBMEwa1E 2PqYJQ6SdpUwJ5DOjfrowG+2Is3Koe5g+noli90r1MWqbECEqDVgzBoIlClfjeVW5z5n Fv4TDg87yHbQ0PrVaNpBO5gwm0L2E1bnYJqsWP9s/70Fpme3z58QVCL3jppZG7Vasv3W XVlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MdZsobpZ; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si2879649ejg.48.2020.10.28.02.18.57; Wed, 28 Oct 2020 02:19:19 -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=@kernel.org header.s=default header.b=MdZsobpZ; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2901138AbgJ0OTK (ORCPT + 99 others); Tue, 27 Oct 2020 10:19:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:38362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2507091AbgJ0OQT (ORCPT ); Tue, 27 Oct 2020 10:16:19 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 913D92072D; Tue, 27 Oct 2020 14:16:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808179; bh=EaVGLOqosdDnuoqnp9KvdgBjE13iAV5BuKEcTCxeSgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MdZsobpZy049o2QHtAYi8ibNEbe8tOPGGIwQ91OvUgP2o7EmYJA41ZtteKgyMchCT ejgOkQEUfs49N2tvIyyxn3e186vaQBgBQsXLdUiXiJdWy4l6Opgu4GX5bAYpcFQvBF 0LWfYhwfaNU51gvbfKVZQCwuF3rk4/0CmcB4o420= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Valentin Vidic , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.14 186/191] net: korina: cast KSEG0 address to pointer in kfree Date: Tue, 27 Oct 2020 14:50:41 +0100 Message-Id: <20201027134918.675220906@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Valentin Vidic [ Upstream commit 3bd57b90554b4bb82dce638e0668ef9dc95d3e96 ] Fixes gcc warning: passing argument 1 of 'kfree' makes pointer from integer without a cast Fixes: 3af5f0f5c74e ("net: korina: fix kfree of rx/tx descriptor array") Reported-by: kernel test robot Signed-off-by: Valentin Vidic Link: https://lore.kernel.org/r/20201018184255.28989-1-vvidic@valentin-vidic.from.hr Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/korina.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index 1357d464e8c43..1eccdbaa9a515 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c @@ -1188,7 +1188,7 @@ static int korina_probe(struct platform_device *pdev) return rc; probe_err_register: - kfree(KSEG0ADDR(lp->td_ring)); + kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring)); probe_err_td_ring: iounmap(lp->tx_dma_regs); probe_err_dma_tx: @@ -1208,7 +1208,7 @@ static int korina_remove(struct platform_device *pdev) iounmap(lp->eth_regs); iounmap(lp->rx_dma_regs); iounmap(lp->tx_dma_regs); - kfree(KSEG0ADDR(lp->td_ring)); + kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring)); unregister_netdev(bif->dev); free_netdev(bif->dev); -- 2.25.1