From patchwork Sat Mar 24 13:44:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10306047 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9667360385 for ; Sat, 24 Mar 2018 13:45:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8816B292BD for ; Sat, 24 Mar 2018 13:45:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C314292C1; Sat, 24 Mar 2018 13:45:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2499E292BD for ; Sat, 24 Mar 2018 13:45:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752161AbeCXNpO (ORCPT ); Sat, 24 Mar 2018 09:45:14 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:34175 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbeCXNpN (ORCPT ); Sat, 24 Mar 2018 09:45:13 -0400 Received: by mail-qt0-f196.google.com with SMTP id l25so15410731qtj.1 for ; Sat, 24 Mar 2018 06:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=92UDumAf/zGW5w7+gpn5N4fmRRPugobXCvYOJhvXEhM=; b=J3YD6DUbLoQIkMmM2zLsOLpG+RY4vHA+zNsmWLlZ5KXFWolL8yZBpG+yiXf++tJmuU gaziZQAGVZOL7z1fdZ82rm+fNHzIBIBYAWy+lemWdrRu9gQKea7/7cw4A69vUIssA0z+ N1JDqFqfL+vENk1Ek6BkJqM3Uu01ncB3TrZ44HCJcPpa9PQzSauJ4grWG/Cypm3a4dgp kQx7UQLTYoYwvVZ4pV8LYudQfsFSG9NZLRE55cODOqA3bNqI6+ZLwc2SEjblcHrGipYs 7YBnEQ0JBGe+lroAznHJhHZ/v32oMFaY1W1sW4FpZY0Gcz/PA/PLv2PzLZ7mb2gvck/k MLqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=92UDumAf/zGW5w7+gpn5N4fmRRPugobXCvYOJhvXEhM=; b=QbqlxaQgLwn8BYFUeL1uGXcV8NyVjK0nWUj6erVHB+NgJhtfpbIwPwEKM+iEqkdDNC JhWPdhkIAWRO4CFaV7fBuJ63hLWV/d42bdwzlF42cyJ95tiow74FJOX6v3Z99YdiHRy7 0ylVuS6fGY58rzQ1pFYwNLJ5D4bsEkwSuoPBGNLnF58eIoMC+NQLHogNzRNpy3yZrknJ jQJU0LAzPfIiRJDWhjLai6aw5hn/e45CKln5O6rd992ZqGlxnpV+uLH6LWfquBCenbTF pp+G6o8Ui4PLBnSyjMwgOcRX2Ld8RfhABncaRT+o2fUVi5rokpTv8z+sLWT8UqjjmH/g e/5g== X-Gm-Message-State: AElRT7FuznEyJB/9BY04Wwl2SzOBa0JGwQHkQLJC89kMeJaz5vZG9R56 JwKfTPlfwFLa6THqNTlpbxQ= X-Google-Smtp-Source: AG47ELuksDq0J5mAerY/v9QWLxeaxVH7NSLCn/1GRomHKyvuKwUhy5Dr6uyJPW9qXTzbYKEsnFteLw== X-Received: by 10.200.34.245 with SMTP id g50mr45021905qta.93.1521899112313; Sat, 24 Mar 2018 06:45:12 -0700 (PDT) Received: from localhost.localdomain ([187.180.181.214]) by smtp.gmail.com with ESMTPSA id c25sm7944552qtn.9.2018.03.24.06.45.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 Mar 2018 06:45:11 -0700 (PDT) From: Fabio Estevam To: sameo@linux.intel.com Cc: linux-wireless@vger.kernel.org, christophe.ricard@gmail.com, linux-nfc@lists.01.org, Fabio Estevam Subject: [PATCH 2/2] nfc: st21nfca: Remove unnecessary devm_kzalloc() cast Date: Sat, 24 Mar 2018 10:44:59 -0300 Message-Id: <1521899099-23634-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521899099-23634-1-git-send-email-festevam@gmail.com> References: <1521899099-23634-1-git-send-email-festevam@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam There is no need to use cast for the returned value from memory allocation functions, so remove the unnecessary cast. Detected via Coccinelle script: scripts/coccinelle/api/alloc/alloc_cast.cocci. Signed-off-by: Fabio Estevam --- drivers/nfc/st21nfca/se.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/nfc/st21nfca/se.c b/drivers/nfc/st21nfca/se.c index fd967a3..5b63549 100644 --- a/drivers/nfc/st21nfca/se.c +++ b/drivers/nfc/st21nfca/se.c @@ -326,8 +326,7 @@ int st21nfca_connectivity_event_received(struct nfc_hci_dev *hdev, u8 host, skb->data[0] != NFC_EVT_TRANSACTION_AID_TAG) return -EPROTO; - transaction = (struct nfc_evt_transaction *)devm_kzalloc(dev, - skb->len - 2, GFP_KERNEL); + transaction = devm_kzalloc(dev, skb->len - 2, GFP_KERNEL); if (!transaction) return -ENOMEM;