Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85c395bf authored by VijayaKumar T M's avatar VijayaKumar T M Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Fix warnings and errors with llvm



Fix pointer-bool-conversion, logical-not-parentheses
errors and warnings with llvm.

Change-Id: I5ffb2d5a699004362fa7f5a4cc50f4f57f06a2f0
Signed-off-by: default avatarVijayaKumar T M <vtmuni@codeaurora.org>
parent bf12895d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2017, 2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -205,7 +205,7 @@ int msm_camera_get_clk_info(struct platform_device *pdev,
{
	int rc = 0;

	if (!pdev || !&pdev->dev || !clk_info || !clk_ptr || !num_clk)
	if (!pdev || (&pdev->dev == NULL) || !clk_info || !clk_ptr || !num_clk)
		return -EINVAL;

	rc = msm_camera_get_clk_info_internal(&pdev->dev,
@@ -507,7 +507,7 @@ int msm_camera_put_clk_info(struct platform_device *pdev,
{
	int rc = 0;

	if (!pdev || !&pdev->dev || !clk_info || !clk_ptr)
	if (!pdev || (&pdev->dev == NULL) || !clk_info || !clk_ptr)
		return -EINVAL;

	rc = msm_camera_put_clk_info_internal(&pdev->dev,
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -622,7 +622,7 @@ static inline int __msm_remove_session_cmd_ack_q(void *d1, void *d2)
{
	struct msm_command_ack *cmd_ack = d1;

	if (!(&cmd_ack->command_q))
	if (&cmd_ack->command_q == NULL)
		return 0;

	msm_queue_drain(&cmd_ack->command_q, struct msm_command, list);
@@ -632,7 +632,7 @@ static inline int __msm_remove_session_cmd_ack_q(void *d1, void *d2)

static void msm_remove_session_cmd_ack_q(struct msm_session *session)
{
	if ((!session) || !(&session->command_ack_q))
	if ((!session) || (&session->command_ack_q == NULL))
		return;

	mutex_lock(&session->lock);
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2009-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2009-2017, 2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -363,7 +363,8 @@ static int32_t msm_flash_i2c_release(
{
	int32_t rc = 0;

	if (!(&flash_ctrl->power_info) || !(&flash_ctrl->flash_i2c_client)) {
	if ((&flash_ctrl->power_info == NULL) ||
		(&flash_ctrl->flash_i2c_client == NULL)) {
		pr_err("%s:%d failed: %pK %pK\n",
			__func__, __LINE__, &flash_ctrl->power_info,
			&flash_ctrl->flash_i2c_client);
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2017, 2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1353,7 +1353,7 @@ int msm_cam_sensor_handle_reg_gpio(int seq_val,
	CDBG("%s: %d GPIO offset: %d, seq_val: %d\n", __func__, __LINE__,
		gpio_offset, seq_val);

	if ((gconf->gpio_num_info->valid[gpio_offset] == 1)) {
	if (gconf->gpio_num_info->valid[gpio_offset] == 1) {
		gpio_set_value_cansleep(
			gconf->gpio_num_info->gpio_num
			[gpio_offset], val);