lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230619162246.33007-2-prathubaronia2011@gmail.com>
Date:   Mon, 19 Jun 2023 21:52:45 +0530
From:   Prathu Baronia <prathubaronia2011@...il.com>
To:     prathubaronia2011@...il.com,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
        Khadija Kamran <kamrankhadijadj@...il.com>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc:     dan.carpenter@...aro.org, error27@...il.com, lkp@...el.com,
        oe-kbuild-all@...ts.linux.dev, oe-kbuild@...ts.linux.dev
Subject: [PATCH v6 2/2] axis-fifo: change device name by assigning unique device id

Allocating the device name with a unique identifier
instead of a kernel address.

Signed-off-by: Prathu Baronia <prathubaronia2011@...il.com>
---
 drivers/staging/axis-fifo/axis-fifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 7d8da9ce2db8..5e070e00e27a 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -853,7 +853,7 @@ static int axis_fifo_probe(struct platform_device *pdev)
 	dev_dbg(fifo->dt_device, "remapped memory to 0x%p\n", fifo->base_addr);
 
 	/* create unique device name */
-	device_name = devm_kasprintf(dev, GFP_KERNEL, "%s_%p", DRIVER_NAME, &r_mem->start);
+	device_name = devm_kasprintf(dev, GFP_KERNEL, "%s_%d", DRIVER_NAME, pdev->id);
 	if (!device_name) {
 		rc = -ENOMEM;
 		goto err_initial;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ