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

Commit e25201d6 authored by Sameer Wadgaonkar's avatar Sameer Wadgaonkar Committed by Greg Kroah-Hartman
Browse files

staging: unisys: change pr_err to dev_err in visor_check_channel



Changing pr_err to dev_err in visor_check_channel. Added device
as an argument to visor_check_channel to pass into dev_err.

Signed-off-by: default avatarSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 13fe0c8f
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -166,9 +166,10 @@ struct visor_device {


#define to_visor_device(x) container_of(x, struct visor_device, device)
#define to_visor_device(x) container_of(x, struct visor_device, device)


int visor_check_channel(struct channel_header *ch, const guid_t *expected_guid,
int visor_check_channel(struct channel_header *ch, struct device *dev,
			char *chname, u64 expected_min_bytes,
			const guid_t *expected_uuid, char *chname,
			u32 expected_version, u64 expected_signature);
			u64 expected_min_bytes,	u32 expected_version,
			u64 expected_signature);


int visorbus_register_visor_driver(struct visor_driver *drv);
int visorbus_register_visor_driver(struct visor_driver *drv);
void visorbus_unregister_visor_driver(struct visor_driver *drv);
void visorbus_unregister_visor_driver(struct visor_driver *drv);
+18 −15
Original line number Original line Diff line number Diff line
@@ -70,6 +70,7 @@ static LIST_HEAD(list_all_device_instances);
 * is used to pass the EFI_DIAG_CAPTURE_PROTOCOL needed to log messages.
 * is used to pass the EFI_DIAG_CAPTURE_PROTOCOL needed to log messages.
 */
 */
int visor_check_channel(struct channel_header *ch,
int visor_check_channel(struct channel_header *ch,
			struct device *dev,
			const guid_t *expected_guid,
			const guid_t *expected_guid,
			char *chname,
			char *chname,
			u64 expected_min_bytes,
			u64 expected_min_bytes,
@@ -79,16 +80,16 @@ int visor_check_channel(struct channel_header *ch,
	if (!guid_is_null(expected_guid)) {
	if (!guid_is_null(expected_guid)) {
		/* caller wants us to verify type GUID */
		/* caller wants us to verify type GUID */
		if (!guid_equal(&ch->chtype, expected_guid)) {
		if (!guid_equal(&ch->chtype, expected_guid)) {
			pr_err("Channel mismatch on channel=%s(%pUL) field=type expected=%pUL actual=%pUL\n",
			dev_err(dev, "Channel mismatch on channel=%s(%pUL) field=type expected=%pUL actual=%pUL\n",
			       chname, expected_guid,
				chname, expected_guid, expected_guid,
			       expected_guid, &ch->chtype);
				&ch->chtype);
			return 0;
			return 0;
		}
		}
	}
	}
	/* verify channel size */
	/* verify channel size */
	if (expected_min_bytes > 0) {
	if (expected_min_bytes > 0) {
		if (ch->size < expected_min_bytes) {
		if (ch->size < expected_min_bytes) {
			pr_err("Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
			dev_err(dev, "Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
				chname, expected_guid,
				chname, expected_guid,
				(unsigned long long)expected_min_bytes,
				(unsigned long long)expected_min_bytes,
				ch->size);
				ch->size);
@@ -98,7 +99,7 @@ int visor_check_channel(struct channel_header *ch,
	/* verify channel version */
	/* verify channel version */
	if (expected_version > 0) {
	if (expected_version > 0) {
		if (ch->version_id != expected_version) {
		if (ch->version_id != expected_version) {
			pr_err("Channel mismatch on channel=%s(%pUL) field=version expected=0x%-8.8lx actual=0x%-8.8x\n",
			dev_err(dev, "Channel mismatch on channel=%s(%pUL) field=version expected=0x%-8.8lx actual=0x%-8.8x\n",
				chname, expected_guid,
				chname, expected_guid,
				(unsigned long)expected_version,
				(unsigned long)expected_version,
				ch->version_id);
				ch->version_id);
@@ -108,9 +109,9 @@ int visor_check_channel(struct channel_header *ch,
	/* verify channel signature */
	/* verify channel signature */
	if (expected_signature > 0) {
	if (expected_signature > 0) {
		if (ch->signature != expected_signature) {
		if (ch->signature != expected_signature) {
			pr_err("Channel mismatch on channel=%s(%pUL) field=signature expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
			dev_err(dev, "Channel mismatch on channel=%s(%pUL) field=signature expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
			       chname, expected_guid,
				chname, expected_guid,	expected_signature,
			       expected_signature, ch->signature);
				ch->signature);
			return 0;
			return 0;
		}
		}
	}
	}
@@ -699,11 +700,13 @@ void remove_visor_device(struct visor_device *dev)
}
}


static int get_vbus_header_info(struct visorchannel *chan,
static int get_vbus_header_info(struct visorchannel *chan,
				struct device *dev,
				struct visor_vbus_headerinfo *hdr_info)
				struct visor_vbus_headerinfo *hdr_info)
{
{
	int err;
	int err;


	if (!visor_check_channel(visorchannel_get_header(chan),
	if (!visor_check_channel(visorchannel_get_header(chan),
				 dev,
				 &visor_vbus_channel_guid,
				 &visor_vbus_channel_guid,
				 "vbus",
				 "vbus",
				 sizeof(struct visor_vbus_channel),
				 sizeof(struct visor_vbus_channel),
@@ -1030,7 +1033,7 @@ int visorbus_create_instance(struct visor_device *dev)
				    &client_bus_info_debugfs_fops);
				    &client_bus_info_debugfs_fops);


	dev_set_drvdata(&dev->device, dev);
	dev_set_drvdata(&dev->device, dev);
	err = get_vbus_header_info(dev->visorchannel, hdr_info);
	err = get_vbus_header_info(dev->visorchannel, &dev->device, hdr_info);
	if (err < 0)
	if (err < 0)
		goto err_debugfs_dir;
		goto err_debugfs_dir;


+1 −0
Original line number Original line Diff line number Diff line
@@ -1736,6 +1736,7 @@ static int visorchipset_init(struct acpi_device *acpi_device)


	controlvm_channel = chipset_dev->controlvm_channel;
	controlvm_channel = chipset_dev->controlvm_channel;
	if (!visor_check_channel(visorchannel_get_header(controlvm_channel),
	if (!visor_check_channel(visorchannel_get_header(controlvm_channel),
				 &chipset_dev->acpi_device->dev,
				 &visor_controlvm_channel_guid,
				 &visor_controlvm_channel_guid,
				 "controlvm",
				 "controlvm",
				 sizeof(struct visor_controlvm_channel),
				 sizeof(struct visor_controlvm_channel),