From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C7A5C5ACCC for ; Thu, 18 Oct 2018 13:46:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A67020645 for ; Thu, 18 Oct 2018 13:46:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A67020645 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728141AbeJRVr2 (ORCPT ); Thu, 18 Oct 2018 17:47:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:37772 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726932AbeJRVr2 (ORCPT ); Thu, 18 Oct 2018 17:47:28 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A43D3AF44; Thu, 18 Oct 2018 13:46:20 +0000 (UTC) Date: Thu, 18 Oct 2018 15:46:20 +0200 Message-ID: From: Takashi Iwai To: "Philipp Klocke" Cc: , "Jaroslav Kysela" , Subject: Re: [PATCH] [sound/i2c/cs8427] Fix int to char conversion In-Reply-To: <20181018103303.30226-1-philipp97kl@gmail.com> References: <20181018103303.30226-1-philipp97kl@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/26 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Oct 2018 12:33:02 +0200, Philipp Klocke wrote: > > Compiling with clang yields the following warning: > > sound/i2c/cs8427.c:140:31: warning: implicit conversion from 'int' > to 'char' changes value from 160 to -96 [-Wconstant-conversion] > data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF; > ~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ > > Because CS8427_REG_AUTOINC is defined as 128, it is too big for a > char field. > So change data from char to unsigned char, that it can hold the value. > > This patch does not change the generated code. > > Signed-off-by: Philipp Klocke Applied, thanks. But at the next time, please put the relevant subsystem MLs to Cc, and use the proper subject prefix (depending on the subsystem). Takashi