Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4053394ybf; Tue, 3 Mar 2020 18:58:04 -0800 (PST) X-Google-Smtp-Source: ADFU+vuwqTny+fiGnc8C65ft+jeQxiEhZVa5UBRM/uAL9WGaaYEyW6FyCE3VSDG4yZasYpvWKm2p X-Received: by 2002:a9d:6457:: with SMTP id m23mr771353otl.162.1583290684731; Tue, 03 Mar 2020 18:58:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583290684; cv=none; d=google.com; s=arc-20160816; b=BDTFMS7g0mhWdAXxwZKtSrqeFSslK7gMgpeOjHqH6oVGzy3BeYlfqZ/026o+K6jaRp fTijLpLT7ZKNd20xcCkKMY3zmF/t4zLscwRutXj4ewq2tDciLBKVffL4eXWjlZsh/0vK SzxOHFDGNKCCftM9FACbydouiCji0gqbN59NUHy+yUV3UoDq1Oiqpat9r0kWzLmOTELb E90UCoML2TgMZK4t26QiZH33PwM5+mMtf1pnoRVqxP24ooWrwzReSqj+87X9y20gNcGn axyvJRIUP3WPTmSu0VFM051mdlLQ2UUf3Ww8/Lyx39J8eYllh9pYPh1wxIhXyXjPjv6J qyzw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7FGKC2CL96iktvyoBP2vbwLVT6EXR3CbHjrpB2EcLgw=; b=yRtfymUzn6RigHEVnYdPhScFrMTJvMxgejqfe/VtjBropoy0yyb21U2ayAjlWg3p8E HUuIcSHyVRGOeoCCai3jZzFkXe2ESA+9wrTWNpX9Q9UUdhDUcQL8775gP35aczgWcCfn hPZt+pZ8+IFrSj8n4OW4tiO2uWKYjSmCkr9i/+rKwo3ixppe5bAu09onOzIpdYxbMiYS thnXtyTMwYETWZW6JqWhAeYvbZT7yyLqnAAXpCRZYZJG9kiz7+CfW+mX3uV35SZS5svJ t6o7BfUIOw/zZIFUgM1oGnjhhWgUIQZOy+fI19g1bBg5VoMSpuKC4a+33Ee+1DOSxcBZ uSCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="tTCfhx/g"; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o20si288206otl.60.2020.03.03.18.57.53; Tue, 03 Mar 2020 18:58:04 -0800 (PST) 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=@mediatek.com header.s=dk header.b="tTCfhx/g"; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387645AbgCDC5p (ORCPT + 99 others); Tue, 3 Mar 2020 21:57:45 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:45822 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2387606AbgCDC5o (ORCPT ); Tue, 3 Mar 2020 21:57:44 -0500 X-UUID: ade7f8cadf214fb9a237d6b66b54d078-20200304 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=7FGKC2CL96iktvyoBP2vbwLVT6EXR3CbHjrpB2EcLgw=; b=tTCfhx/g1qhqKpevrkLgsvBeegIu1ks/WCTwPSKDnA8QTDnP0suLCet+eiC92Qs23Z07051doeyoV/PPwLn9xacyway3xcQgiN1NDNGamqKI+nviKDh21xmINSZtam7ikkMeG0sTOXx1z0vvTPsRNUmniC+7YiGGxDwfmwDi6eE=; X-UUID: ade7f8cadf214fb9a237d6b66b54d078-20200304 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1476990711; Wed, 04 Mar 2020 10:57:38 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 4 Mar 2020 10:56:29 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 4 Mar 2020 10:58:16 +0800 From: To: CC: , , , , , , Light Hsieh Subject: [PATCH v1 3/3] block: set partition read/write policy according to write-protection status Date: Wed, 4 Mar 2020 10:57:35 +0800 Message-ID: <1583290655-7858-4-git-send-email-light.hsieh@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1583290655-7858-1-git-send-email-light.hsieh@mediatek.com> References: <1583290655-7858-1-git-send-email-light.hsieh@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: AD653E083DF72116517A8B50D156A40CD7AB2538B191E5E1374BE5F9BE197B342000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogTGlnaHQgSHNpZWggPGxpZ2h0LmhzaWVoQG1lZGlhdGVrLmNvbT4NCg0KRm9yIHN0b3Jh Z2UgZGV2aWNlIHdpdGggd3JpdGUtcHJvdGVjdGlvbiBzdXBwb3J0LCBlLmcuIGVNTUMsIHJlZ2lz dGVy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