From patchwork Thu Apr 17 15:53:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 28583 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DE9F220674 for ; Thu, 17 Apr 2014 15:53:56 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 19sf1199847ykq.4 for ; Thu, 17 Apr 2014 08:53:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=Ojn0eR7EzOu6zEUiKFM8n8bZJVvkSpVnVb3BBK9srS8=; b=iSXTMnoVuaXXiMwOv9h0YpNlzvjJZmx0Pg2bY8EpLISziFa5AoNDv6ovipY0WNfnlQ bgYkKlYr2QawcNd5KM16DRwytZaFYlSZlNQ2GnoMyQ9Y6K1sjVLW8jheIezMIcFICkXE kaXuX21X+j7EJLDydzIA4QnDdgSAsVcKoxKqTPjC7P3CM/PG/Imgt2+DEylr3zTzG+Kx 0sapvyZKR4RcCAs5sH+C7CvO/3tllULYHE6PIzOb2qWRif+JsvE7s7JQ7xzpRVX0xW6M M+SsHEMT/BS8ylrYx9ejJTng2TYxqaHqr2BGoywsayDq5FTuA7FJ0wNhnWMDOXl9ZAcl wrmg== X-Gm-Message-State: ALoCoQna0ryL7Bd/mqWFkH2JfqgqCeL96jOSWgvx/RKx9zPHloDsWNZWJbdt3jH0UyFgeWVK2yLx X-Received: by 10.224.22.71 with SMTP id m7mr5857438qab.8.1397750036677; Thu, 17 Apr 2014 08:53:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.203 with SMTP id w69ls1121999qge.3.gmail; Thu, 17 Apr 2014 08:53:56 -0700 (PDT) X-Received: by 10.58.169.97 with SMTP id ad1mr97763vec.45.1397750036536; Thu, 17 Apr 2014 08:53:56 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id wd2si4514701veb.167.2014.04.17.08.53.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 08:53:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so711199veb.14 for ; Thu, 17 Apr 2014 08:53:56 -0700 (PDT) X-Received: by 10.58.186.71 with SMTP id fi7mr1097230vec.32.1397750036462; Thu, 17 Apr 2014 08:53:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp45968vcb; Thu, 17 Apr 2014 08:53:56 -0700 (PDT) X-Received: by 10.68.213.97 with SMTP id nr1mr16468023pbc.52.1397750035717; Thu, 17 Apr 2014 08:53:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4si2677025pav.118.2014.04.17.08.53.54; Thu, 17 Apr 2014 08:53:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751207AbaDQPxt (ORCPT + 8 others); Thu, 17 Apr 2014 11:53:49 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:45986 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbaDQPxj (ORCPT ); Thu, 17 Apr 2014 11:53:39 -0400 Received: by mail-ee0-f45.google.com with SMTP id d17so835187eek.32 for ; Thu, 17 Apr 2014 08:53:37 -0700 (PDT) X-Received: by 10.14.210.65 with SMTP id t41mr14979019eeo.35.1397750017653; Thu, 17 Apr 2014 08:53:37 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id y51sm68450957eeu.0.2014.04.17.08.53.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 17 Apr 2014 08:53:36 -0700 (PDT) From: Semen Protsenko To: "Rafael J. Wysocki" , Len Brown Cc: , Subject: [PATCH] acpi: respect const qualifier Date: Thu, 17 Apr 2014 18:53:26 +0300 Message-Id: <1397750006-17463-1-git-send-email-semen.protsenko@linaro.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: semen.protsenko@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch fixes next warning: <------------------------------- cut here ---------------------------------> drivers/acpi/property.c: In function ‘acpi_free_properties’: drivers/acpi/property.c:35:2: warning: passing argument 1 of ‘acpi_os_free’ discards ‘const’ qualifier from pointer target type [enabled by default] ACPI_FREE(adev->properties); <------------------------------- cut here ---------------------------------> The problem is next: - acpi_free_properties() calls ACPI_FREE(), passing "const *" parameter to it - ACPI_FREE() is macro for acpi_os_free() - acpi_os_free() takes "void *" parameter - acpi_os_free() calls kfree() - but kfree() requires "const void *" parameter So acpi_os_free() should require "const void *" parameter as well. Signed-off-by: Semen Protsenko --- include/acpi/platform/aclinux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 93c55ed..c6fa763 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -174,7 +174,7 @@ static inline void *acpi_os_allocate_zeroed(acpi_size size) #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate_zeroed #define USE_NATIVE_ALLOCATE_ZEROED -static inline void acpi_os_free(void *memory) +static inline void acpi_os_free(const void *memory) { kfree(memory); }