Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1586051
| Path | csiph.com!1.us.feeder.erje.net!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | "Tobin C. Harding" <me@tobin.cc> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ALSA: emu10k1: Remove cast from memory allocation |
| Date | Wed, 22 Feb 2017 11:40:02 +0100 |
| Message-ID | <tdCv0-eA-5@gated-at.bofh.it> (permalink) |
| References | <tdyUp-5Yo-7@gated-at.bofh.it> <tdzdL-6lr-1@gated-at.bofh.it> |
| X-Original-To | Takashi Iwai <tiwai@suse.de> |
| Dkim-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d=tobin.cc; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=q6a4AKTBzVpMsLpe1dtGmLumG1o=; b=AFeeBQ zO/B/D3tF7Y//KrVmxybBFJHfWCzbCpZBkeP0goA5Tg0La12phSN6Majq7I8OAP3 ECJsX3k1piGRvIAojVzSx9pFB9sT9hZSinnMJt3Kf+WClj/F79iIs8kUZaWIoEGi aQs06cOpo5plPL0AItke2cDZ7cVK8H6VU6dKs= |
| Dkim-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=q6a4AKTBzVpMsL pe1dtGmLumG1o=; b=HLH5gokrMu+JsbZZIVVeP2RKcpnyUEuhnD/nRJTpnXUNA5 VHlOImMwKJtOEEX9GXHNKpWy/Ewp6VnHE1sFJOI5RcqrCAbZ+22LgIJVQr5bQ0Vy lxRhDMZ34pcttgx+29Mrw9E1bkPPI8buTRdIAiMqleRsW9WdcsPXhp/d2LVic= |
| X-Me-Sender | <xms:DGqtWPZF00RPhUxRaCIGhKxP40GeSB3zVoS17HvTV5QgKuLZVteCRA> |
| X-Sasl-Enc | j5beFipkoKXVvyoNY9VlvbHghGSrHmWi2CZ+s5dWZx6U 1487759883 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| X-Mailer | Mutt 1.5.24 (2015-08-30) |
| User-Agent | Mutt/1.5.24 (2015-08-30) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 60 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Jaroslav Kysela <perex@perex.cz>, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Wed, 22 Feb 2017 21:37:59 +1100 |
| X-Original-Message-ID | <20170222103759.GC30091@eros> |
| X-Original-References | <1487746036-18181-1-git-send-email-me@tobin.cc> <s5h7f4ioglu.wl-tiwai@suse.de> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1586051 |
Show key headers only | View raw
On Wed, Feb 22, 2017 at 07:59:57AM +0100, Takashi Iwai wrote: > On Wed, 22 Feb 2017 07:47:16 +0100, > Tobin C. Harding wrote: > > > > Coccinelle emits multiple WARNING: casting value returned by memory allocation > > function to (u_int32_t __user *) is useless. > > > > Remove unnecessary cast. > > > > Signed-off-by: Tobin C. Harding <me@tobin.cc> > > __user annotation requires the explicit cast. Ok, thanks for reviewing. Tobin. > > > Takashi > > > > --- > > sound/pci/emu10k1/emufx.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c > > index 56fc47b..8a39a6f 100644 > > --- a/sound/pci/emu10k1/emufx.c > > +++ b/sound/pci/emu10k1/emufx.c > > @@ -1186,8 +1186,8 @@ static int _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu) > > if (!icode) > > return err; > > > > - icode->gpr_map = (u_int32_t __user *) kcalloc(512 + 256 + 256 + 2 * 1024, > > - sizeof(u_int32_t), GFP_KERNEL); > > + icode->gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024, > > + sizeof(u_int32_t), GFP_KERNEL); > > if (!icode->gpr_map) > > goto __err_gpr; > > controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, > > @@ -1824,8 +1824,8 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) > > if (!icode) > > return err; > > > > - icode->gpr_map = (u_int32_t __user *) kcalloc(256 + 160 + 160 + 2 * 512, > > - sizeof(u_int32_t), GFP_KERNEL); > > + icode->gpr_map = kcalloc(256 + 160 + 160 + 2 * 512, > > + sizeof(u_int32_t), GFP_KERNEL); > > if (!icode->gpr_map) > > goto __err_gpr; > > > > -- > > 2.7.4 > > > > -- Tobin Harding http://tobin.cc
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] ALSA: emu10k1: Remove cast from memory allocation "Tobin C. Harding" <me@tobin.cc> - 2017-02-22 07:50 +0100
Re: [PATCH] ALSA: emu10k1: Remove cast from memory allocation Takashi Iwai <tiwai@suse.de> - 2017-02-22 08:10 +0100
Re: [PATCH] ALSA: emu10k1: Remove cast from memory allocation "Tobin C. Harding" <me@tobin.cc> - 2017-02-22 11:40 +0100
csiph-web