Received: by 10.192.165.156 with SMTP id m28csp600227imm; Fri, 13 Apr 2018 04:49:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx48aMAYAJoyknY8puPxR5nVsLfo6XwGMUYmH/uwLr8EyRkfl4wt9sp9inPBblTZ+rtOdbDm0 X-Received: by 2002:a17:902:8b84:: with SMTP id ay4-v6mr4888417plb.57.1523620168431; Fri, 13 Apr 2018 04:49:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523620168; cv=none; d=google.com; s=arc-20160816; b=S6RFw3anukBq6j9/de+9j01gbT63NqQWSWHnijUq62jFj0PTNcHVQnOVjxiAJud2K5 ARpc9EkXLVYea6iB2aEhO7YW1ld9no9d2bxXMH4yRXDvLCzpyNt2qlpK1/O+APrrAKyU VP1CakgIpEXUqdsx23eRcAVdaD1ryLA0X+hjm7cclOMJuFFzfItgkLp3DtrM6cJE3kP7 MseNFcoOXML6mGbJIjUyxx/hdX5+rjOngZmPzb6aB31DyoSs9du0L57SnEHMVAbtXAc8 +RoAS/Qy7+g5mhpaStRrlOgNz+SdBeddbDrJK2C0j9D8NejDTC4fQ6AxNESQzjkWl9tF UzrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Ym7Z1hNwRfELuWaExzt0Lbvn6L6OA4Hkf/yg2e7SqMk=; b=Uxjc7r0HLCRiUwsmqWLT9nnsK39SalboRhn+DKNJZuu4Ts+aMIU2oNAj9Es2dhFyPD CnJ2oy+430UPl4EDfO3f/LtsGyeN3WWn5sHlU1ckNmvtf0ik9Nekibg+Dd0rduhnNRhY SEi6yKA/ta3+BxuyVuYoInZm+B7AjQVKhc7zgCN6xl8bisraSKpZoqEeqdVPdz5mfa5S /sW+GJSsIWN9s/jBBSuINGGncWCa8A3CgMJ1tIQjUGzpRlS90+ugDS3IHcqsJEJupq8v RpS9xiBpyX4pRCf1KZBL2/FF2GdfYO6Bo6GBIFJGcWbJ26PX8iX9n2byPn83HC62/Uh+ x4VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VlaMEmoY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2-v6si5364024plh.121.2018.04.13.04.49.14; Fri, 13 Apr 2018 04:49:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VlaMEmoY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754255AbeDMKaJ (ORCPT + 99 others); Fri, 13 Apr 2018 06:30:09 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:33898 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753754AbeDMKaH (ORCPT ); Fri, 13 Apr 2018 06:30:07 -0400 Received: by mail-wm0-f42.google.com with SMTP id w2so6466665wmw.1 for ; Fri, 13 Apr 2018 03:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Ym7Z1hNwRfELuWaExzt0Lbvn6L6OA4Hkf/yg2e7SqMk=; b=VlaMEmoYwyOAxPMXGSiBOWxiBUwQ6IiS7G6EpJGi3xwV1BC6PIxRIyIIGhlPA1n13/ ui7E4nLKZPA4tsVsCS/cEH7pca7HOBwLpimpzqRcHVMmLOtqLlWcmaZnKmFQiSGFg5T+ lSskX0QDWEhNgoKLubeO+HztQ/lohkCyH8HTE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ym7Z1hNwRfELuWaExzt0Lbvn6L6OA4Hkf/yg2e7SqMk=; b=A5eLlSVNOzXpVMrr6opc8XCgGx9AknIl8NV3gIbzesHxlQCpnR+24iHl4SMaj1OM/s cmfGzX2ziD43hTEcwTCiAK+pmOanF0UdWj9gUyS0Zu/Nvwqkr79WK5yfaA0usyNQvq+L kUNa9bBoX8aK3IYVqmlH5n6atjj9J/xlo5G0kjGBqEAoXIkwWtnGsR7xvEUZg4nqB82v UrR8MYs5ha55a8czJd3ICzYMzoCPF2dlQGALtUPqQUFKct4LV9jDMbrDranyiipPNlbN TCSWF4bTKBDvqpiOh5jG4EpUf37LT04SxEUfzoDzQWnyP1kTl0ckP2E7dcoNKq/WFeC3 ePXw== X-Gm-Message-State: ALQs6tAtbRMtTZAD/g8fYc8sPsaT1BwJeTpqdLV/Jibz8TKbMB2wItuG lLqYIZQZ2vFrVxwh8DSg0bzchA== X-Received: by 10.28.202.7 with SMTP id a7mr3530414wmg.93.1523615406161; Fri, 13 Apr 2018 03:30:06 -0700 (PDT) Received: from [192.168.8.101] ([37.170.104.147]) by smtp.googlemail.com with ESMTPSA id 39sm10228373wry.89.2018.04.13.03.30.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Apr 2018 03:30:05 -0700 (PDT) Subject: Re: [GIT PULL] Thermal management updates for v4.17-rc1 To: Bartlomiej Zolnierkiewicz Cc: Zhang Rui , Eduardo Valentin , Linus Torvalds , LKML , Linux PM list , "Li, Philip" References: <1523436077.16235.5.camel@intel.com> <3546651.LUmDXQgY88@amdc3058> <16cbc915-ad89-7bab-c644-8086cfef082f@linaro.org> <4212243.RcCUWlsaar@amdc3058> From: Daniel Lezcano Message-ID: <3b41052a-233d-9992-223a-d16f48295905@linaro.org> Date: Fri, 13 Apr 2018 12:30:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <4212243.RcCUWlsaar@amdc3058> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/04/2018 11:28, Bartlomiej Zolnierkiewicz wrote: [ ... ] >>> It is okay to return 0 because this code-path (the default one) will be >>> never hit by the driver (probe makes sure of it) - the default case is >>> here is just to silence compilation errors.. >> >> The init function is making sure cal_type is one or another. Can you fix >> it correctly by replacing the 'switch' by a 'if' instead of adding dead >> branches to please gcc? >> >> if (data->cal_type == TYPE_TWO_POINT_TRIMMING) { >> return ...; >> } >> >> return ...; > > I'm not the one that added this switch statement (it has been there since > 2011) and I would be happy to remove it. Actually the switch statement was fine until the cleanup. > However could we please defer > this to v4.17 and merge the current set of Exynos thermal fixes/cleanups > (they simplify the driver a lot and make ground for future changes)? Regarding the latest comment, this can be fixed properly by 'return' (or whatever you want which does not get around of gcc warnings). -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog