mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
media: staging/ipu7: Use %pe format specifier
The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./ipu7/ipu7-isys-csi-phy.c:311:23-30: WARNING: Consider using %pe to print PTR_ERR() ./ipu7/ipu7-isys-csi2.c:59:22-29: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
committed by
Hans Verkuil
parent
53a5927b44
commit
d5ddab0cf0
@@ -307,8 +307,8 @@ static int ipu7_isys_csi_ctrl_dids_config(struct ipu7_isys_csi2 *csi2, u32 id)
|
||||
|
||||
pad = media_entity_remote_source_pad_unique(&csi2->asd.sd.entity);
|
||||
if (IS_ERR(pad)) {
|
||||
dev_warn(dev, "can't get remote source pad of %s (%ld)\n",
|
||||
csi2->asd.sd.name, PTR_ERR(pad));
|
||||
dev_warn(dev, "can't get remote source pad of %s (%pe)\n",
|
||||
csi2->asd.sd.name, pad);
|
||||
return PTR_ERR(pad);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ s64 ipu7_isys_csi2_get_link_freq(struct ipu7_isys_csi2 *csi2)
|
||||
src_pad = media_entity_remote_source_pad_unique(&csi2->asd.sd.entity);
|
||||
if (IS_ERR(src_pad)) {
|
||||
dev_err(&csi2->isys->adev->auxdev.dev,
|
||||
"can't get source pad of %s (%ld)\n",
|
||||
csi2->asd.sd.name, PTR_ERR(src_pad));
|
||||
"can't get source pad of %s (%pe)\n",
|
||||
csi2->asd.sd.name, src_pad);
|
||||
return PTR_ERR(src_pad);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user