From nobody Tue Dec 2 02:29:48 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D11333A018 for ; Wed, 19 Nov 2025 09:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544004; cv=none; b=Ccr5ygPYpslVDXPHjnkeAKGTi0aOv+q4lkcKXFN/RVDJ7b29wXV7ap4VuRPIpYJ8w7dSTQv91s+bf4uq/He/qEdQpyI2Q/YZs4i2zuQo9KR8DRHctv4ZE45mAAuCVKZyXK+L7SplKE8QPB2PkiLQGyeQGdzR+hHTXar/c3xmRZg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544004; c=relaxed/simple; bh=umVcvpZch6lHgvMwSr4NUVIVWHCjRQL8dZsocsznTuM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YK9q6DcKvH7Vspjkv6gFADsPx+sMhjS9vA5tWC7RO9pMPbWTKmG19oLwDwTHdoDtrdArvRIBwIGKbMuocswStf0f+WTJmgmXzPZg9pCjhfULdqb/nRN4dfmY4bYTYQyaUv50LRbLWUziOEY3orfX84QeVvxE037P9XUhPZddqS8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dhRN62b/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dhRN62b/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFBE2C2BCB1; Wed, 19 Nov 2025 09:20:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763544003; bh=umVcvpZch6lHgvMwSr4NUVIVWHCjRQL8dZsocsznTuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dhRN62b/Ozp/zX4FHx9Hgxj3Xf041nySu91CGRt6k/75PYgcg0MrNHg+hWv/UkkYy eTfVKGdwCss+laI9qLJF3UJ4d3mq1CJh69c1k8No92hc5HBums58NULJA+mcXvjE8U yAyBSXqYS0HgQaA2wTMNuoooZJgh8oXuUedR5rh8gE9+j/QS5vH78LzKkzx6Sdjo9K 8ur5piURCg7ivlPx+tdqoJd1NbtMDilluC0naCumSUiwwtdRAV6tdzHZ8lUFQy9TDa 7RqcwkbHvs26A93M4SFM4OQVbIbYhNK2UuZfMyCSuUy/LL1NS+P4hsLD7GpNrlzqjd +8ITRtbAvXgcg== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 5/6] char/mwave: drop printk wrapper Date: Wed, 19 Nov 2025 10:19:48 +0100 Message-ID: <20251119091949.825958-6-jirislaby@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251119091949.825958-1-jirislaby@kernel.org> References: <20251119091949.825958-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" PRINTK_ERROR() + KERN_ERR_MWAVE are just wrappers around printk() with a prefix. Instead, pr_fmt() can be used. Drop the former and use the latter. Signed-off-by: Jiri Slaby (SUSE) --- drivers/char/mwave/3780i.c | 4 ++- drivers/char/mwave/mwavedd.c | 58 +++++++++++------------------------ drivers/char/mwave/mwavedd.h | 3 -- drivers/char/mwave/smapi.c | 59 +++++++++++++++++++++--------------- drivers/char/mwave/tp3780i.c | 35 ++++++++++++--------- 5 files changed, 74 insertions(+), 85 deletions(-) diff --git a/drivers/char/mwave/3780i.c b/drivers/char/mwave/3780i.c index 6024cf7d5705..a1bd9dd36d21 100644 --- a/drivers/char/mwave/3780i.c +++ b/drivers/char/mwave/3780i.c @@ -46,6 +46,8 @@ * First release to the public */ =20 +#define pr_fmt(fmt) "3780i: " fmt + #include #include #include @@ -138,7 +140,7 @@ int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSet= tings, unsigned short tval; =20 if (!pSettings->bDSPEnabled) { - PRINTK_ERROR( KERN_ERR "3780i::dsp3780I_EnableDSP: Error: DSP not enable= d. Aborting.\n" ); + pr_err("%s: Error: DSP not enabled. Aborting.\n", __func__); return -EIO; } =20 diff --git a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c index f01c6f7d54a3..6ab355cfe43e 100644 --- a/drivers/char/mwave/mwavedd.c +++ b/drivers/char/mwave/mwavedd.c @@ -46,6 +46,8 @@ * First release to the public */ =20 +#define pr_fmt(fmt) "mwavedd: " fmt + #include #include #include @@ -200,11 +202,8 @@ static long mwave_ioctl(struct file *file, unsigned in= t iocmd, unsigned int ipcnum =3D (unsigned int) ioarg; =09 if (ipcnum >=3D ARRAY_SIZE(pDrvData->IPCs)) { - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd::mwave_ioctl:" - " IOCTL_MW_REGISTER_IPC:" - " Error: Invalid ipcnum %x\n", - ipcnum); + pr_err("%s: IOCTL_MW_REGISTER_IPC: Error: Invalid ipcnum %x\n", + __func__, ipcnum); return -EINVAL; } ipcnum =3D array_index_nospec(ipcnum, @@ -221,10 +220,8 @@ static long mwave_ioctl(struct file *file, unsigned in= t iocmd, unsigned int ipcnum =3D (unsigned int) ioarg; =09 if (ipcnum >=3D ARRAY_SIZE(pDrvData->IPCs)) { - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd::mwave_ioctl:" - " IOCTL_MW_GET_IPC: Error:" - " Invalid ipcnum %x\n", ipcnum); + pr_err("%s: IOCTL_MW_GET_IPC: Error: Invalid ipcnum %x\n", __func__, + ipcnum); return -EINVAL; } ipcnum =3D array_index_nospec(ipcnum, @@ -259,11 +256,8 @@ static long mwave_ioctl(struct file *file, unsigned in= t iocmd, unsigned int ipcnum =3D (unsigned int) ioarg; =09 if (ipcnum >=3D ARRAY_SIZE(pDrvData->IPCs)) { - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd::mwave_ioctl:" - " IOCTL_MW_UNREGISTER_IPC:" - " Error: Invalid ipcnum %x\n", - ipcnum); + pr_err("%s: IOCTL_MW_UNREGISTER_IPC: Error: Invalid ipcnum %x\n", + __func__, ipcnum); return -EINVAL; } ipcnum =3D array_index_nospec(ipcnum, @@ -298,9 +292,7 @@ static int register_serial_portandirq(unsigned int port= , int irq) /* OK */ break; default: - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd::register_serial_portandirq:" - " Error: Illegal port %x\n", port ); + pr_err("%s: Error: Illegal port %x\n", __func__, port); return -1; } /* switch */ /* port is okay */ @@ -313,9 +305,7 @@ static int register_serial_portandirq(unsigned int port= , int irq) /* OK */ break; default: - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd::register_serial_portandirq:" - " Error: Illegal irq %x\n", irq ); + pr_err("%s: Error: Illegal irq %x\n", __func__, irq); return -1; } /* switch */ /* irq is okay */ @@ -391,43 +381,33 @@ static int __init mwave_init(void) =20 retval =3D tp3780I_InitializeBoardData(&pDrvData->rBDData); if (retval) { - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd::mwave_init: Error:" - " Failed to initialize board data\n"); + pr_err("%s: Error: Failed to initialize board data\n", __func__); goto cleanup_error; } pDrvData->bBDInitialized =3D true; =20 retval =3D tp3780I_CalcResources(&pDrvData->rBDData); if (retval) { - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd:mwave_init: Error:" - " Failed to calculate resources\n"); + pr_err("%s: Error: Failed to calculate resources\n", __func__); goto cleanup_error; } =20 retval =3D tp3780I_ClaimResources(&pDrvData->rBDData); if (retval) { - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd:mwave_init: Error:" - " Failed to claim resources\n"); + pr_err("%s: Error: Failed to claim resources\n", __func__); goto cleanup_error; } pDrvData->bResourcesClaimed =3D true; =20 retval =3D tp3780I_EnableDSP(&pDrvData->rBDData); if (retval) { - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd:mwave_init: Error:" - " Failed to enable DSP\n"); + pr_err("%s: Error: Failed to enable DSP\n", __func__); goto cleanup_error; } pDrvData->bDSPEnabled =3D true; =20 if (misc_register(&mwave_misc_dev) < 0) { - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd:mwave_init: Error:" - " Failed to register misc device\n"); + pr_err("%s: Error: Failed to register misc device\n", __func__); goto cleanup_error; } pDrvData->bMwaveDevRegistered =3D true; @@ -437,9 +417,7 @@ static int __init mwave_init(void) pDrvData->rBDData.rDspSettings.usUartIrq ); if (pDrvData->sLine < 0) { - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd:mwave_init: Error:" - " Failed to register serial driver\n"); + pr_err("%s: Error: Failed to register serial driver\n", __func__); goto cleanup_error; } /* uart is registered */ @@ -448,9 +426,7 @@ static int __init mwave_init(void) return 0; =20 cleanup_error: - PRINTK_ERROR(KERN_ERR_MWAVE - "mwavedd::mwave_init: Error:" - " Failed to initialize\n"); + pr_err("%s: Error: Failed to initialize\n", __func__); mwave_exit(); /* clean up */ =20 return -EIO; diff --git a/drivers/char/mwave/mwavedd.h b/drivers/char/mwave/mwavedd.h index fdd5dfdd3639..453305494d12 100644 --- a/drivers/char/mwave/mwavedd.h +++ b/drivers/char/mwave/mwavedd.h @@ -61,9 +61,6 @@ extern int mwave_3780i_io; extern int mwave_uart_irq; extern int mwave_uart_io; =20 -#define PRINTK_ERROR printk -#define KERN_ERR_MWAVE KERN_ERR "mwave: " - typedef struct _MWAVE_IPC { unsigned short usIntCount; /* 0=3Dnone, 1=3Dfirst, 2=3Dgreater than 1st */ bool bIsEnabled; diff --git a/drivers/char/mwave/smapi.c b/drivers/char/mwave/smapi.c index 1efddb34bef0..107a2cb9c31c 100644 --- a/drivers/char/mwave/smapi.c +++ b/drivers/char/mwave/smapi.c @@ -46,6 +46,8 @@ * First release to the public */ =20 +#define pr_fmt(fmt) "smapi: " fmt + #include #include /* CMOS defines */ #include "smapi.h" @@ -127,7 +129,7 @@ int smapi_query_DSP_cfg(SMAPI_DSP_SETTINGS * pSettings) bRC =3D smapi_request(0x1802, 0x0000, 0, 0, &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); if (bRC) { - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Error: Could no= t get DSP Settings. Aborting.\n"); + pr_err("%s: Error: Could not get DSP Settings. Aborting.\n", __func__); return bRC; } =20 @@ -143,14 +145,14 @@ int smapi_query_DSP_cfg(SMAPI_DSP_SETTINGS * pSetting= s) =20 /* check for illegal values */ if ( pSettings->usDspBaseIO =3D=3D 0 )=20 - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Worry: DSP base= I/O address is 0\n"); + pr_err("%s: Worry: DSP base I/O address is 0\n", __func__); if ( pSettings->usDspIRQ =3D=3D 0 ) - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Worry: DSP IRQ = line is 0\n"); + pr_err("%s: Worry: DSP IRQ line is 0\n", __func__); =20 bRC =3D smapi_request(0x1804, 0x0000, 0, 0, &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); if (bRC) { - PRINTK_ERROR("smapi::smapi_query_DSP_cfg: Error: Could not get DSP modem= settings. Aborting.\n"); + pr_err("%s: Error: Could not get DSP modem settings. Aborting.\n", __fun= c__); return bRC; }=20 =20 @@ -164,9 +166,9 @@ int smapi_query_DSP_cfg(SMAPI_DSP_SETTINGS * pSettings) =20 /* check for illegal values */ if ( pSettings->usUartBaseIO =3D=3D 0 )=20 - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Worry: UART bas= e I/O address is 0\n"); + pr_err("%s: Worry: UART base I/O address is 0\n", __func__); if ( pSettings->usUartIRQ =3D=3D 0 ) - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_query_DSP_cfg: Worry: UART IRQ= line is 0\n"); + pr_err("%s: Worry: UART IRQ line is 0\n", __func__); =20 return bRC; } @@ -195,7 +197,8 @@ int smapi_set_DSP_cfg(void) break; } if (i =3D=3D ARRAY_SIZE(ausDspBases)) { - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg: Error: Invalid m= wave_3780i_io address %x. Aborting.\n", mwave_3780i_io); + pr_err("%s: Error: Invalid mwave_3780i_io address %x. Aborting.\n", + __func__, mwave_3780i_io); return bRC; } dspio_index =3D i; @@ -207,7 +210,8 @@ int smapi_set_DSP_cfg(void) break; } if (i =3D=3D ARRAY_SIZE(ausDspIrqs)) { - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg: Error: Invalid m= wave_3780i_irq %x. Aborting.\n", mwave_3780i_irq); + pr_err("%s: Error: Invalid mwave_3780i_irq %x. Aborting.\n", __func__, + mwave_3780i_irq); return bRC; } } @@ -218,7 +222,8 @@ int smapi_set_DSP_cfg(void) break; } if (i =3D=3D ARRAY_SIZE(ausUartBases)) { - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg: Error: Invalid m= wave_uart_io address %x. Aborting.\n", mwave_uart_io); + pr_err("%s: Error: Invalid mwave_uart_io address %x. Aborting.\n", __fu= nc__, + mwave_uart_io); return bRC; } uartio_index =3D i; @@ -231,7 +236,8 @@ int smapi_set_DSP_cfg(void) break; } if (i =3D=3D ARRAY_SIZE(ausUartIrqs)) { - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg: Error: Invalid m= wave_uart_irq %x. Aborting.\n", mwave_uart_irq); + pr_err("%s: Error: Invalid mwave_uart_irq %x. Aborting.\n", __func__, + mwave_uart_irq); return bRC; } } @@ -246,13 +252,14 @@ int smapi_set_DSP_cfg(void) if (usBX & 0x0100) { /* serial port A is present */ if (usCX & 1) { /* serial port is enabled */ if ((usSI & 0xFF) =3D=3D mwave_uart_irq) { - PRINTK_ERROR(KERN_ERR_MWAVE - "smapi::smapi_set_DSP_cfg: Serial port A irq %x conflicts with mwave= _uart_irq %x\n", usSI & 0xFF, mwave_uart_irq); + pr_err("%s: Serial port A irq %x conflicts with mwave_uart_irq %x\n", + __func__, usSI & 0xFF, mwave_uart_irq); goto exit_conflict; } else { if ((usSI >> 8) =3D=3D uartio_index) { - PRINTK_ERROR(KERN_ERR_MWAVE - "smapi::smapi_set_DSP_cfg: Serial port A base I/O address %x confli= cts with mwave uart I/O %x\n", ausUartBases[usSI >> 8], ausUartBases[uartio= _index]); + pr_err("%s: Serial port A base I/O address %x conflicts with mwave u= art I/O %x\n", + __func__, ausUartBases[usSI >> 8], + ausUartBases[uartio_index]); goto exit_conflict; } } @@ -267,13 +274,14 @@ int smapi_set_DSP_cfg(void) if (usBX & 0x0100) { /* serial port B is present */ if (usCX & 1) { /* serial port is enabled */ if ((usSI & 0xFF) =3D=3D mwave_uart_irq) { - PRINTK_ERROR(KERN_ERR_MWAVE - "smapi::smapi_set_DSP_cfg: Serial port B irq %x conflicts with mwave= _uart_irq %x\n", usSI & 0xFF, mwave_uart_irq); + pr_err("%s: Serial port B irq %x conflicts with mwave_uart_irq %x\n", + __func__, usSI & 0xFF, mwave_uart_irq); goto exit_conflict; } else { if ((usSI >> 8) =3D=3D uartio_index) { - PRINTK_ERROR(KERN_ERR_MWAVE - "smapi::smapi_set_DSP_cfg: Serial port B base I/O address %x confli= cts with mwave uart I/O %x\n", ausUartBases[usSI >> 8], ausUartBases[uartio= _index]); + pr_err("%s: Serial port B base I/O address %x conflicts with mwave u= art I/O %x\n", + __func__, ausUartBases[usSI >> 8], + ausUartBases[uartio_index]); goto exit_conflict; } } @@ -290,13 +298,14 @@ int smapi_set_DSP_cfg(void) /* bRC =3D=3D 0 */ if ((usCX & 0xff) !=3D 0xff) { /* IR port not disabled */ if ((usCX & 0xff) =3D=3D mwave_uart_irq) { - PRINTK_ERROR(KERN_ERR_MWAVE - "smapi::smapi_set_DSP_cfg: IR port irq %x conflicts with mwave_uart_i= rq %x\n", usCX & 0xff, mwave_uart_irq); + pr_err("%s: IR port irq %x conflicts with mwave_uart_irq %x\n", + __func__, usCX & 0xff, mwave_uart_irq); goto exit_conflict; } else { if ((usSI & 0xff) =3D=3D uartio_index) { - PRINTK_ERROR(KERN_ERR_MWAVE - "smapi::smapi_set_DSP_cfg: IR port base I/O address %x conflicts wit= h mwave uart I/O %x\n", ausUartBases[usSI & 0xff], ausUartBases[uartio_inde= x]); + pr_err("%s: IR port base I/O address %x conflicts with mwave uart I/O= %x\n", + __func__, ausUartBases[usSI & 0xff], + ausUartBases[uartio_index]); goto exit_conflict; } } @@ -348,7 +357,7 @@ int smapi_set_DSP_cfg(void) return -EIO; =20 exit_smapi_request_error: - PRINTK_ERROR(KERN_ERR_MWAVE "smapi::smapi_set_DSP_cfg exit on smapi_reque= st error bRC %x\n", bRC); + pr_err("%s: exit on smapi_request error bRC %x\n", __func__, bRC); return bRC; } =20 @@ -381,13 +390,13 @@ int smapi_init(void) g_usSmapiPort |=3D (CMOS_READ(0x7F) << 8); spin_unlock_irqrestore(&rtc_lock, flags); if (g_usSmapiPort =3D=3D 0) { - PRINTK_ERROR("smapi::smapi_init, ERROR unable to read from SMAPI port\n= "); + pr_err("%s: ERROR unable to read from SMAPI port\n", __func__); } else { retval =3D 0; //SmapiQuerySystemID(); } } else { - PRINTK_ERROR("smapi::smapi_init, ERROR invalid usSmapiID\n"); + pr_err("%s: ERROR invalid usSmapiID\n", __func__); retval =3D -ENXIO; } =20 diff --git a/drivers/char/mwave/tp3780i.c b/drivers/char/mwave/tp3780i.c index b7e95c57a1c4..6a924e1bc678 100644 --- a/drivers/char/mwave/tp3780i.c +++ b/drivers/char/mwave/tp3780i.c @@ -46,6 +46,8 @@ * First release to the public */ =20 +#define pr_fmt(fmt) "tp3780i: " fmt + #include #include #include @@ -133,7 +135,7 @@ int tp3780I_InitializeBoardData(THINKPAD_BD_DATA * pBDD= ata) =20 retval =3D smapi_init(); if (retval) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_InitializeBoardData: Error= : SMAPI is not available on this machine\n"); + pr_err("%s: Error: SMAPI is not available on this machine\n", __func__); } else { if (mwave_3780i_irq || mwave_3780i_io || mwave_uart_irq || mwave_uart_io= ) { retval =3D smapi_set_DSP_cfg(); @@ -153,7 +155,7 @@ int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData) DSP_3780I_CONFIG_SETTINGS *pSettings =3D &pBDData->rDspSettings; =20 if (smapi_query_DSP_cfg(&rSmapiInfo)) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_CalcResources: Error: Coul= d not query DSP config. Aborting.\n"); + pr_err("%s: Error: Could not query DSP config. Aborting.\n", __func__); return -EIO; } =20 @@ -164,7 +166,7 @@ int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData) || ( rSmapiInfo.usUartIRQ =3D=3D 0 ) || ( rSmapiInfo.usUartBaseIO =3D=3D 0 ) ) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_CalcResources: Error: Ille= gal resource setting. Aborting.\n"); + pr_err("%s: Error: Illegal resource setting. Aborting.\n", __func__); return -EIO; } =20 @@ -200,7 +202,8 @@ int tp3780I_ClaimResources(THINKPAD_BD_DATA * pBDData) if ( pres =3D=3D NULL ) retval =3D -EIO; =20 if (retval) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_ClaimResources: Error: Cou= ld not claim I/O region starting at %x\n", pSettings->usDspBaseIO); + pr_err("%s: Error: Could not claim I/O region starting at %x\n", __func_= _, + pSettings->usDspBaseIO); return -EIO; } =20 @@ -229,12 +232,12 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) bool bDSPPoweredUp =3D false, bInterruptAllocated =3D false; =20 if (pBDData->bDSPEnabled) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: DSP alre= ady enabled!\n"); + pr_err("%s: Error: DSP already enabled!\n", __func__); goto exit_cleanup; } =20 if (!pSettings->bDSPEnabled) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780::tp3780I_EnableDSP: Error: pSettings= ->bDSPEnabled not set\n"); + pr_err("%s: Error: pSettings->bDSPEnabled not set\n", __func__); goto exit_cleanup; } =20 @@ -244,7 +247,7 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) || (s_ausThinkpadIrqToField[pSettings->usDspIrq] =3D=3D 0xFFFF) || (s_ausThinkpadDmaToField[pSettings->usDspDma] =3D=3D 0xFFFF) ) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: invalid = irq %x\n", pSettings->usDspIrq); + pr_err("%s: Error: invalid irq %x\n", __func__, pSettings->usDspIrq); goto exit_cleanup; } =20 @@ -252,7 +255,8 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) ((pSettings->usDspBaseIO & 0xF00F) !=3D 0) || (pSettings->usDspBaseIO & 0x0FF0) =3D=3D 0 ) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Invalid = DSP base I/O address %x\n", pSettings->usDspBaseIO); + pr_err("%s: Error: Invalid DSP base I/O address %x\n", __func__, + pSettings->usDspBaseIO); goto exit_cleanup; } =20 @@ -261,7 +265,7 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) pSettings->usUartIrq >=3D s_numIrqs || s_ausThinkpadIrqToField[pSettings->usUartIrq] =3D=3D 0xFFFF ) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Invalid= UART IRQ %x\n", pSettings->usUartIrq); + pr_err("%s: Error: Invalid UART IRQ %x\n", __func__, pSettings->usUartI= rq); goto exit_cleanup; } switch (pSettings->usUartBaseIO) { @@ -272,7 +276,8 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) break; =20 default: - PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Invalid UART base I/O= address %x\n", pSettings->usUartBaseIO); + pr_err("%s: Error: Invalid UART base I/O address %x\n", __func__, + pSettings->usUartBaseIO); goto exit_cleanup; } } @@ -301,14 +306,14 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) pSettings->usChipletEnable =3D TP_CFG_ChipletEnable; =20 if (request_irq(pSettings->usUartIrq, &UartInterrupt, 0, "mwave_uart", NU= LL)) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Could no= t get UART IRQ %x\n", pSettings->usUartIrq); + pr_err("%s: Error: Could not get UART IRQ %x\n", __func__, pSettings->us= UartIrq); goto exit_cleanup; } else { /* no conflict just release */ free_irq(pSettings->usUartIrq, NULL); } =20 if (request_irq(pSettings->usDspIrq, &DspInterrupt, 0, "mwave_3780i", NUL= L)) { - PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Could not get 3780i IRQ= %x\n", pSettings->usDspIrq); + pr_err("%s: Error: Could not get 3780i IRQ %x\n", __func__, pSettings->u= sDspIrq); goto exit_cleanup; } else { bInterruptAllocated =3D true; @@ -317,14 +322,14 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) =20 smapi_set_DSP_power_state(false); if (smapi_set_DSP_power_state(true)) { - PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: smapi_se= t_DSP_power_state(true) failed\n"); + pr_err("%s: Error: smapi_set_DSP_power_state(true) failed\n", __func__); goto exit_cleanup; } else { bDSPPoweredUp =3D true; } =20 if (dsp3780I_EnableDSP(pSettings, s_ausThinkpadIrqToField, s_ausThinkpadD= maToField)) { - PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: dsp7880I_EnableDSP() fa= iled\n"); + pr_err("%s: Error: dsp7880I_EnableDSP() failed\n", __func__); goto exit_cleanup; } =20 @@ -335,7 +340,7 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) return 0; =20 exit_cleanup: - PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Cleaning up\n"); + pr_err("%s: Cleaning up\n", __func__); if (bDSPPoweredUp) smapi_set_DSP_power_state(false); if (bInterruptAllocated) { --=20 2.51.1