From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754837AbdIGInl (ORCPT ); Thu, 7 Sep 2017 04:43:41 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:60591 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754776AbdIGInj (ORCPT ); Thu, 7 Sep 2017 04:43:39 -0400 Subject: Re: linux-next: build warning after merge of the tpmdd tree To: Stephen Rothwell , Jarkko Sakkinen References: <20170907123132.1fef5ca8@canb.auug.org.au> Cc: Linux-Next Mailing List , Linux Kernel Mailing List From: Colin Ian King Message-ID: Date: Thu, 7 Sep 2017 09:43:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170907123132.1fef5ca8@canb.auug.org.au> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for reporting that Stephen, I've sent a fix to address this issue. Colin On 07/09/17 03:31, Stephen Rothwell wrote: > Hi Jarkko, > > After merging the tpmdd tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > drivers/char/tpm/tpm_tis_core.c: In function 'probe_itpm': > drivers/char/tpm/tpm_tis_core.c:469:31: warning: passing argument 2 of 'tpm_tis_send_data' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] > rc = tpm_tis_send_data(chip, cmd_getticks, len); > ^ > drivers/char/tpm/tpm_tis_core.c:255:12: note: expected 'u8 * {aka unsigned char *}' but argument is of type 'const u8 * {aka const unsigned char *}' > static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len) > ^ > drivers/char/tpm/tpm_tis_core.c:477:31: warning: passing argument 2 of 'tpm_tis_send_data' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] > rc = tpm_tis_send_data(chip, cmd_getticks, len); > ^ > drivers/char/tpm/tpm_tis_core.c:255:12: note: expected 'u8 * {aka unsigned char *}' but argument is of type 'const u8 * {aka const unsigned char *}' > static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len) > ^ > > Introduced by commit > > 5e35bd8e06b9 ("tpm_tis: make array cmd_getticks static const to shink object code size") >